summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-checkbox.html
blob: 2e6d1f10763e2a40c4aef8d373ce286af45832c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<% include('tr-td-label.html', @_ ) %>

  <TD <% $style %>>
    <INPUT TYPE  = "checkbox"
           NAME  = "<% $opt{field} %>"
           ID    = "<% $opt{id} %>"
           VALUE = "<% $opt{value} %>"
           <% $opt{curr_value} eq $opt{value} ? ' CHECKED' : '' %>
           <% $onchange %>
    >
  </TD>

</TR>

<%init>

my %opt = @_;

my $onchange = $opt{'onchange'}
                 ? 'onChange="'. $opt{'onchange'}. '(this)"'
                 : '';

my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';

</%init>