diff options
Diffstat (limited to 'rt/share/html/Search/Elements/PickCFs')
-rw-r--r-- | rt/share/html/Search/Elements/PickCFs | 49 |
1 files changed, 14 insertions, 35 deletions
diff --git a/rt/share/html/Search/Elements/PickCFs b/rt/share/html/Search/Elements/PickCFs index beda9f733..ba25cdeda 100644 --- a/rt/share/html/Search/Elements/PickCFs +++ b/rt/share/html/Search/Elements/PickCFs @@ -78,41 +78,20 @@ while ( my $CustomField = $CustomFields->Next ) { my %line; $line{'Name'} = "'CF.{" . $CustomField->Name . "}'"; $line{'Field'} = $CustomField->Name; - - # Op - if ($CustomField->Type eq 'Date') { - $line{'Op'} = { - Type => 'component', - Path => '/Elements/SelectDateRelation', - Arguments => {}, - }; - } else { - $line{'Op'} = { - Type => 'component', - Path => '/Elements/SelectCustomFieldOperator', - Arguments => { True => loc("is"), - False => loc("isn't"), - TrueVal=> '=', - FalseVal => '!=', - }, - }; - } - - # Value - if ($CustomField->Type eq 'Date') { - $line{'Value'} = { - Type => 'component', - Path => '/Elements/SelectDate', - Arguments => {}, - }; - } else { - $line{'Value'} = { - Type => 'component', - Path => '/Elements/SelectCustomFieldValue', - Arguments => { CustomField => $CustomField }, - }; - } - + $line{'Op'} = { + Type => 'component', + Path => '/Elements/SelectCustomFieldOperator', + Arguments => { True => loc("is"), + False => loc("isn't"), + TrueVal=> '=', + FalseVal => '!=', + }, + }; + $line{'Value'} = { + Type => 'component', + Path => '/Elements/SelectCustomFieldValue', + Arguments => { CustomField => $CustomField }, + }; push @lines, \%line; } |