projects
/
pxelator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfc13d1
)
added empty option if none of them is selected
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 27 Aug 2009 19:58:18 +0000
(19:58 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 27 Aug 2009 19:58:18 +0000
(19:58 +0000)
lib/PXElator/html.pm
patch
|
blob
|
history
diff --git
a/lib/PXElator/html.pm
b/lib/PXElator/html.pm
index
64f55fb
..
80a3de5
100644
(file)
--- a/
lib/PXElator/html.pm
+++ b/
lib/PXElator/html.pm
@@
-45,6
+45,7
@@
sub tt {
sub select {
my $name = shift;
my $selected_option = shift;
+ unshift @_, '' unless $selected_option;
return join("\n"
, qq|<select type=select name=$name>|
, join("\n", map { my $selected = $_ eq $selected_option ? 'selected' : ''; qq|<option name=$_ $selected>$_</option>| } @_ )