<% include('tr-td-label.html', @_ ) %> > <% $opt{'prefix'} %> <% $maxlength %> <% $style %> <% $opt{disabled} %> <% $onchange %> ><% $opt{'postfix'} %> <%init> my %opt = @_; my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value}; my $onchange = $opt{'onchange'} ? 'onChange="'. $opt{'onchange'}. '(this)"' : ''; my $size = $opt{'size'} ? 'SIZE="'. $opt{'size'}. '"' : ''; my $maxlength = $opt{'maxlength'} ? 'MAXLENGTH="'. $opt{'maxlength'}. '"' : ''; my @style = (); push @style, 'text-align: '. $opt{'text-align'} if $opt{'text-align'}; push @style, 'background-color: #dddddd' if $opt{'disabled'}; $opt{'disabled'} = 'DISABLED' if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah? my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';