diff options
author | ivan <ivan> | 2009-05-31 06:59:37 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-05-31 06:59:37 +0000 |
commit | 9832f4d4086970d7612ff2a6facd797fa85d7814 (patch) | |
tree | 1a4be172ef73fd9b9584022599fb3eccf868c6a5 /httemplate/elements/select-table.html | |
parent | 650c968bf1493c601dcf1b57d98ef0bdb1a2caa6 (diff) |
package definition browse/search, filter by package class, RT#5255
Diffstat (limited to 'httemplate/elements/select-table.html')
-rw-r--r-- | httemplate/elements/select-table.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/httemplate/elements/select-table.html b/httemplate/elements/select-table.html index e7baaf53b..1a440f07e 100644 --- a/httemplate/elements/select-table.html +++ b/httemplate/elements/select-table.html @@ -64,8 +64,13 @@ Example: > % while ( @pre_options ) { - <OPTION VALUE="<% shift(@pre_options) %>"><% shift(@pre_options) %> - +% my $pre_opt = shift(@pre_options); +% my $pre_label = shift(@pre_options); +% my $selected = ( ref($value) && $value->{$pre_opt} ) +% || ( $value eq $pre_opt ); + <OPTION VALUE="<% $pre_opt %>" + <% $selected ? 'SELECTED' : '' %> + ><% $pre_label %> % } % unless ( $opt{'multiple'} || $opt{'disable_empty'} ) { |