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:18:55 -0700 |
| commit | 1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (patch) | |
| tree | 96922ad4459eda1e649327fd391d60c58d454c53 /rt/share/html/Search/Elements/ConditionRow | |
| parent | 4f5619288413a185e9933088d9dd8c5afbc55dfa (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 = ''; |
