X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Finput-text.html;h=18272ebe2314acb2ac6a0c99e7367e9fe53c2ecc;hp=9db064348849ff6575d5770a11b619221858d537;hb=d4114381c5d95e8acd0d0fc2bbc2b3528bde2ecf;hpb=63a268637b2d51a8766412617724b9436439deb6 diff --git a/httemplate/elements/input-text.html b/httemplate/elements/input-text.html index 9db064348..18272ebe2 100644 --- a/httemplate/elements/input-text.html +++ b/httemplate/elements/input-text.html @@ -5,6 +5,7 @@ <% $size %> <% $maxlength %> <% $style %> + <% $opt{autocomplete} ? 'autocomplete="off"' : '' %> <% $opt{disabled} %> <% $onchange %> ><% $opt{'postfix'} %> @@ -15,7 +16,9 @@ my %opt = @_; my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value}; my $onchange = $opt{'onchange'} - ? 'onChange="'. $opt{'onchange'}. '(this)"' + ? join(' ', map $_.'="'. $opt{'onchange'}. '(this)"', + qw( onChange onKeyDown onKeyUp onKeyPress ) + ) : ''; my $size = $opt{'size'} @@ -31,13 +34,17 @@ $opt{'disabled'} = &{ $opt{'disabled'} }( \%opt ) $opt{'disabled'} = 'DISABLED' if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah? -my @style = (); +my @style = ref($opt{'style'}) + ? @{ $opt{'style'} } + : $opt{'style'} + ? ( $opt{'style'} ) + : (); push @style, 'text-align: '. $opt{'text-align'} if $opt{'text-align'}; push @style, 'background-color: #dddddd' - if $opt{'disabled'}; + if $opt{'disabled'} && ! $opt{'nodarken_disabled'}; my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';