summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-state.html
diff options
context:
space:
mode:
authorivan <ivan>2009-01-09 04:06:26 +0000
committerivan <ivan>2009-01-09 04:06:26 +0000
commit20bddf47a41b6d064b3cfa4c41e55c157cf0c3de (patch)
tree61b285cb23ccb27b145bdee84ff0c7421477eaba /httemplate/elements/select-state.html
parent2b8ffc98529637ffddfe7cbf6b4f9b8deb90f0fa (diff)
pick/enter a location when ordering a package, RT#4499
Diffstat (limited to 'httemplate/elements/select-state.html')
-rw-r--r--httemplate/elements/select-state.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/httemplate/elements/select-state.html b/httemplate/elements/select-state.html
index f7ac2c7bf..9b358e24d 100644
--- a/httemplate/elements/select-state.html
+++ b/httemplate/elements/select-state.html
@@ -14,6 +14,7 @@ Example:
disable_empty => 1, #defaults to 1, disable the empty option
empty_label => 'all', #label for empty option
disable_countyupdate => 0, #bool - disabled update of the select-state.html
+ style => [ 'attribute:value', 'another:value' ],
);
</%doc>
@@ -21,6 +22,8 @@ Example:
<SELECT NAME = "<% $pre %>state"
ID = "<% $pre %>state"
onChange = "<% $onchange %>"
+ <% $opt{'disabled'} %>
+ <% $style %>
>
% unless ( $opt{'disable_empty'} ) {
@@ -51,6 +54,12 @@ my $onchange =
( $opt{'disable_countyupdate'} ? '' : $pre.'state_changed(this); ' ).
$opt{'onchange'};
+$opt{'style'} ||= [];
+my $style =
+ scalar(@{$opt{style}})
+ ? 'STYLE="'. join(';', @{$opt{style}}). '"'
+ : '';
+
tie my %states, 'Tie::IxHash', states_hash( $opt{'country'} );
</%init>