invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / httemplate / elements / checkbox.html
1 <% $opt{'prefix'} %><INPUT TYPE  = "checkbox"
2                            NAME  = "<% $opt{field} %>"
3                            ID    = "<% $opt{id} %>"
4                            VALUE = "<% $opt{value} %>"
5                            <% $opt{curr_value} eq $opt{value}
6                                 ? ' CHECKED'
7                                 : ''
8                            %>
9                            <% $opt{disabled} %>
10                            <% $onchange %>
11                     ><% $opt{'postfix'} %>
12 <%init>
13
14 my %opt = @_;
15
16 my $onchange = $opt{'onchange'}
17                  ? 'onChange="'. $opt{'onchange'}. '(this)"'
18                  : '';
19
20 $opt{'disabled'} = &{ $opt{'disabled'} }( \%opt )
21   if ref($opt{'disabled'}) eq 'CODE';
22 $opt{'disabled'} = 'DISABLED'
23   if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah?
24
25 </%init>