fix selected option
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 6 Aug 2009 18:09:30 +0000 (18:09 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 6 Aug 2009 18:09:30 +0000 (18:09 +0000)
lib/PXElator/html.pm

index 857f923..3dd07b3 100644 (file)
@@ -29,10 +29,10 @@ sub tt {
 
 sub select {
        my $name = shift;
-       my $checked_option = shift;
+       my $selected_option = shift;
        return join("\n"        
                , qq|<select type=select name=$name>|
-               , join("\n", map { my $checked = $_ eq $checked_option ? 'checked' : ''; qq|<option name=$_ $checked>$_</option>| } @_ )
+               , join("\n", map { my $selected = $_ eq $selected_option ? 'selected' : ''; qq|<option name=$_ $selected>$_</option>| } @_ )
                , qq|</select>|
                , qq|</form>|
        );