diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:18:55 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:27:04 -0700 |
| commit | e131b1f71f08b69abb832c1687d1f29682d171f8 (patch) | |
| tree | 490167e41d9fe05b760e7b21a96ee35a86f8edda /rt/share/html/Search/Elements/ConditionRow | |
| parent | d05d7346bb2387fd9d0354923d577275c5c7f019 (diff) | |
RT 4.2.11, ticket#13852
Diffstat (limited to 'rt/share/html/Search/Elements/ConditionRow')
| -rw-r--r-- | rt/share/html/Search/Elements/ConditionRow | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rt/share/html/Search/Elements/ConditionRow b/rt/share/html/Search/Elements/ConditionRow index edf738107..80ecd97b4 100644 --- a/rt/share/html/Search/Elements/ConditionRow +++ b/rt/share/html/Search/Elements/ConditionRow @@ -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 = ''; |
