From eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 1 Aug 2007 22:26:52 +0000 Subject: event refactor, landing on HEAD! --- httemplate/elements/tr-checkbox-multiple.html | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 httemplate/elements/tr-checkbox-multiple.html (limited to 'httemplate/elements/tr-checkbox-multiple.html') diff --git a/httemplate/elements/tr-checkbox-multiple.html b/httemplate/elements/tr-checkbox-multiple.html new file mode 100644 index 000000000..bb90a820b --- /dev/null +++ b/httemplate/elements/tr-checkbox-multiple.html @@ -0,0 +1,40 @@ +<% include('tr-td-label.html', @_ ) %> + + > + +% foreach my $option ( @{ $opt{options} } ) { #just arrayref for now + + {$option} || $value eq $option + ? ' CHECKED' : '' + %> + <% $onchange %> + + > <% $labels->{$option} %> + +
+ +% } + + + + + +<%init> + +my %opt = @_; + +my $onchange = $opt{'onchange'} + ? 'onChange="'. $opt{'onchange'}. '(this)"' + : ''; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +my $labels = $opt{'option_labels'} || $opt{'labels'}; + +my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : ''; + + -- cgit v1.2.1