X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-input-text.html;h=f71f2f7fb768417f622dc8d294a3363be7ca0bd4;hb=9dc88f6c738f30ce1eb6339ba4b739b45555dea4;hp=c8bec5ea6704ec21fcb64435c8306ffc9f181ed9;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/httemplate/elements/tr-input-text.html b/httemplate/elements/tr-input-text.html index c8bec5ea6..f71f2f7fb 100644 --- a/httemplate/elements/tr-input-text.html +++ b/httemplate/elements/tr-input-text.html @@ -1,6 +1,6 @@ <% include('tr-td-label.html', @_ ) %> - > + > <% $opt{'prefix'} %> <% $maxlength %> - <% $align %> + <% $style %> + <% $opt{disabled} %> <% $onchange %> ><% $opt{'postfix'} %> @@ -34,11 +35,21 @@ my $maxlength = $opt{'maxlength'} ? 'MAXLENGTH="'. $opt{'maxlength'}. '"' : ''; -my $align = $opt{'text-align'} - ? 'STYLE="text-align: '. $opt{'text-align'}. '"' - : ''; +$opt{'disabled'} = &{ $opt{'disabled'} }( \%opt ) + if ref($opt{'disabled'}) eq 'CODE'; +$opt{'disabled'} = 'DISABLED' + if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah? + +my @style = (); + +push @style, 'text-align: '. $opt{'text-align'} + if $opt{'text-align'}; + +push @style, 'background-color: #dddddd' + if $opt{'disabled'}; +my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; -my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : ''; +my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';