X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FElements%2FPickCFs;h=beda9f733af33ec964d6c1d0471eb5eae6cd166d;hb=995a145c931164347683071c95c6754379d36604;hp=ba25cdeda99c6c9b0848318376c8c7b7e2a56116;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/rt/share/html/Search/Elements/PickCFs b/rt/share/html/Search/Elements/PickCFs index ba25cdeda..beda9f733 100644 --- a/rt/share/html/Search/Elements/PickCFs +++ b/rt/share/html/Search/Elements/PickCFs @@ -78,20 +78,41 @@ while ( my $CustomField = $CustomFields->Next ) { my %line; $line{'Name'} = "'CF.{" . $CustomField->Name . "}'"; $line{'Field'} = $CustomField->Name; - $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 }, - }; + + # 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 }, + }; + } + push @lines, \%line; }