From 2ac302e18d723563692cdbbd74f3e9e5331a3014 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 29 Apr 2010 07:40:46 +0000 Subject: communigate (phase 2): rules: adding conditions and actions to rule edit. RT#7514 --- httemplate/elements/select.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'httemplate/elements/select.html') 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). '"' : ''; + + -- cgit v1.2.1