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 ? join(' ', map $_.'="'. $opt{'onchange'}. '(this)"',
19 qw( onChange onKeyDown onKeyUp onKeyPress )
23 my $size = $opt{'size'}
24 ? 'SIZE="'. $opt{'size'}. '"'
27 my $maxlength = $opt{'maxlength'}
28 ? 'MAXLENGTH="'. $opt{'maxlength'}. '"'
31 $opt{'disabled'} = &{ $opt{'disabled'} }( \%opt )
32 if ref($opt{'disabled'}) eq 'CODE';
33 $opt{'disabled'} = 'DISABLED'
34 if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah?
36 my @style = ref($opt{'style'})
42 push @style, 'text-align: '. $opt{'text-align'}
43 if $opt{'text-align'};
45 push @style, 'background-color: #dddddd'
46 if $opt{'disabled'} && ! $opt{'nodarken_disabled'};
48 my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';