summaryrefslogtreecommitdiff
path: root/httemplate/elements/select.html
diff options
context:
space:
mode:
authorivan <ivan>2010-04-29 07:40:46 +0000
committerivan <ivan>2010-04-29 07:40:46 +0000
commit2ac302e18d723563692cdbbd74f3e9e5331a3014 (patch)
treece25a3f91382098fa749f0d8c5dde7c77699b631 /httemplate/elements/select.html
parentfa6176ab2df85c4b66026e9fe2a7242293d20ce5 (diff)
communigate (phase 2): rules: adding conditions and actions to rule edit. RT#7514
Diffstat (limited to 'httemplate/elements/select.html')
-rw-r--r--httemplate/elements/select.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/httemplate/elements/select.html b/httemplate/elements/select.html
index 268e0d243..5249a6dc3 100644
--- a/httemplate/elements/select.html
+++ b/httemplate/elements/select.html
@@ -4,6 +4,8 @@
ID = "<% $opt{id} %>"
previousValue = "<% $curr_value %>"
previousText = "<% $labels->{$curr_value} || $curr_value %>"
+ <% $style %>
+ <% $opt{disabled} %>
<% $onchange %>
>
@@ -60,4 +62,18 @@ if ( $opt{'onchange'} ) {
$onchange = 'onChange="'. $onchange. '"' unless $onchange =~ /^onChange=/i;
}
+$opt{'disabled'} = &{ $opt{'disabled'} }( \%opt )
+ if ref($opt{'disabled'}) eq 'CODE';
+$opt{'disabled'} = 'DISABLED'
+ if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah?
+
+my @style = ref($opt{'style'})
+ ? @{ $opt{'style'} }
+ : $opt{'style'}
+ ? ( $opt{'style'} )
+ : ();
+
+my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';
+
+
</%init>