1 <% $opt{'prefix'} %><INPUT TYPE = "<% $opt{type} || 'text' %>"
2 NAME = "<% $opt{field} %>"
4 VALUE = "<% $value |h %>"
10 ><% $opt{'postfix'} %>
15 my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value};
17 my $onchange = $opt{'onchange'}
18 ? 'onChange="'. $opt{'onchange'}. '(this)"'
21 my $size = $opt{'size'}
22 ? 'SIZE="'. $opt{'size'}. '"'
25 my $maxlength = $opt{'maxlength'}
26 ? 'MAXLENGTH="'. $opt{'maxlength'}. '"'
29 $opt{'disabled'} = &{ $opt{'disabled'} }( \%opt )
30 if ref($opt{'disabled'}) eq 'CODE';
31 $opt{'disabled'} = 'DISABLED'
32 if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah?
34 my @style = ref($opt{'style'})
40 push @style, 'text-align: '. $opt{'text-align'}
41 if $opt{'text-align'};
43 push @style, 'background-color: #dddddd'
44 if $opt{'disabled'} && ! $opt{'nodarken_disabled'};
46 my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';