updates on basic criteria advanced search pane
authorTim Mallezie <tim.mallezie@chiro.be>
Mon, 2 Mar 2015 21:57:30 +0000 (22:57 +0100)
committerTim Mallezie <tim.mallezie@chiro.be>
Mon, 2 Mar 2015 21:57:30 +0000 (22:57 +0100)
CRM/Contact/Form/Search/Criteria.php

index 8578b763af8fdf6ac3ed44f6978354e7ac21d59d..63fc65bf9775b6214ea9c57d9799a3c897f789fe 100644 (file)
@@ -153,12 +153,14 @@ class CRM_Contact_Form_Search_Criteria {
       }
     }
 
-    $form->addElement('select',
+    $form->add('select',
       'uf_group_id',
       ts('Search Views'),
       array(
         '0' => ts('- default view -'),
-      ) + $searchProfiles
+      ) + $searchProfiles,
+      FALSE,
+      array('class' => 'crm-select2')
     );
 
     $componentModes = CRM_Contact_Form_Search::getModeSelect();
@@ -182,20 +184,23 @@ class CRM_Contact_Form_Search_Criteria {
     }
 
     if (count($componentModes) > 1) {
-      $form->addElement('select',
+      $form->add('select',
         'component_mode',
         ts('Display Results As'),
-        $componentModes
+        $componentModes,
+        FALSE, 
+        array('class' => 'crm-select2')
       );
     }
 
-    $form->addElement('select',
+    $form->addRadio(
       'operator',
       ts('Search Operator'),
       array(
         'AND' => ts('AND'),
         'OR' => ts('OR'),
-      )
+      ),
+      array('allowClear' => FALSE)
     );
 
     // add the option to display relationships
@@ -267,8 +272,8 @@ class CRM_Contact_Form_Search_Criteria {
     $form->addElement('text', 'phone_numeric', ts('Phone Number'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone'));
     $locationType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
     $phoneType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
-    $form->add('select', 'phone_location_type_id', ts('Phone Location'), array('' => ts('- any -')) + $locationType);
-    $form->add('select', 'phone_phone_type_id', ts('Phone Type'), array('' => ts('- any -')) + $phoneType);
+    $form->add('select', 'phone_location_type_id', ts('Phone Location'), array('' => ts('- any -')) + $locationType, FALSE, array('class' => 'crm-select2'));
+    $form->add('select', 'phone_phone_type_id', ts('Phone Type'), array('' => ts('- any -')) + $phoneType, FALSE, array('class' => 'crm-select2'));
   }