This commit was manufactured by cvs2svn to create tag 'freeside_2_1_0'.
[freeside.git] / rt / share / html / Search / Elements / PickCFs
index 3f6d188..ba25cde 100644 (file)
@@ -76,43 +76,22 @@ $m->callback(
 my @lines;
 while ( my $CustomField = $CustomFields->Next ) {
     my %line;
-    $line{'Name'} = "CF.{" . $CustomField->Name . "}";
+    $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;
 }