summaryrefslogtreecommitdiff
path: root/httemplate/elements/radio.html
blob: 9af533246469d02f194fcff7d2d18432b69aa10d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<% $opt{'prefix'} %><INPUT TYPE  = "radio"
                           NAME  = "<% $opt{field} %>"
                           ID    = "<% $opt{id}.'_'.$opt{value} %>"
                           VALUE = "<% $opt{value} %>"
                           <% $opt{curr_value} eq $opt{value}
                                ? ' CHECKED'
                                : ''
                           %>
                           <% $onchange %>
                    ><% $opt{'postfix'} %>
<%init>

my %opt = @_;

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

</%init>