From c8edb1e681cadff9a84572c4a6e3b16662f566cd Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 27 Apr 2010 10:57:01 +0000 Subject: communigate (phase 2): rules: start of adding conditions and actions to rule edit. RT#7514 --- httemplate/elements/select.html | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 httemplate/elements/select.html (limited to 'httemplate/elements/select.html') diff --git a/httemplate/elements/select.html b/httemplate/elements/select.html new file mode 100644 index 000000000..7aa4180b6 --- /dev/null +++ b/httemplate/elements/select.html @@ -0,0 +1,64 @@ +% unless ( $opt{'js_only'} ) { + + + +% } +<%init> + +my %opt = @_; +warn "SELECT.HTML: ". join ' / ', %opt; + +my $onchange = $opt{'onchange'} + ? 'onChange="'. $opt{'onchange'}. '(this)"' + : ''; + +my $labels = $opt{'option_labels'} || $opt{'labels'}; + +my $curr_value = $opt{'curr_value'}; + +my $onchange = ''; +if ( $opt{'onchange'} ) { + $onchange = $opt{'onchange'}; + $onchange .= '(this)' unless $onchange =~ /\(\w*\);?$/; + $onchange =~ s/\(what\);/\(this\);/g; #ugh, terrible hack. all onchange + #callbacks should act the same + $onchange = 'onChange="'. $onchange. '"' unless $onchange =~ /^onChange=/i; +} + + -- cgit v1.2.1