fix A/R report
[freeside.git] / httemplate / elements / tr-checkbox.html
1 <%doc>
2
3 Example:
4
5   <& /elements/tr-checkbox.html,
6        'label' => 'Do or do not',
7        'field' => 'field_name',
8        'value' => 'Y',
9   &>
10
11 </%doc>
12 % if ( $opt{'box_first'} ) {
13   <TR>
14     <TH COLSPAN="<% $opt{'colspan'} || 2 %>"
15       VALIGN = "<% $opt{'valign'} || 'top' %>"
16       STYLE  = "<% $style %>"
17       ID     = "<% $opt{label_id} || $opt{id}. '_label0' %>"
18     >
19       <& checkbox.html, @_ &>
20       <% $required %><% $opt{label} %>
21     </TH>
22   </TR>
23 % } else {
24 <& tr-td-label.html, @_ &>
25
26   <TD <% $style %>>
27     <% include('checkbox.html', @_) %>
28   </TD>
29
30 </TR>
31 % }
32
33 <%init>
34
35 my %opt = @_;
36
37 my $onchange = $opt{'onchange'}
38                  ? 'onChange="'. $opt{'onchange'}. '(this)"'
39                  : '';
40
41 my $style = 'text-align: left; padding-top: 3px';
42 $style .= '; '. $opt{'cell_style'} if $opt{'cell_style'};
43
44 my $required = $opt{'required'} ? '<font color="#ff0000">*</font>&nbsp;' : '';
45 if ($required) {
46   $style .= ';font-weight: bold';
47 }
48
49 </%init>