diff options
Diffstat (limited to 'rt/share/html/Search/Elements/ConditionRow')
-rw-r--r-- | rt/share/html/Search/Elements/ConditionRow | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rt/share/html/Search/Elements/ConditionRow b/rt/share/html/Search/Elements/ConditionRow index 046b3b1ea..80ecd97b4 100644 --- a/rt/share/html/Search/Elements/ConditionRow +++ b/rt/share/html/Search/Elements/ConditionRow @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -74,9 +74,11 @@ $handle_block = sub { return $m->scomp( $box->{'Path'}, %{ $box->{'Arguments'} }, Name => $name ); } if ( $box->{'Type'} eq 'text' ) { - my $default = $box->{'Default'} || ''; - my $size = $box->{'Size'}? qq{size="$box->{'Size'}"} : ''; - return qq{<input id="$name" name="$name" value="$default" $size />}; + $box->{id} ||= $box->{name} ||= $name; + $box->{value} ||= delete($box->{Default}) || ''; + return "<input ".join(" ", map{$m->interp->apply_escapes(lc($_),'h') + .q{="}.$m->interp->apply_escapes($box->{$_},'h').q{"}} + sort keys %$box)." />"; } if ( $box->{'Type'} eq 'select' ) { my $res = ''; |