From 3c0ec132bf20d0e91febaa6d2b9c848f3e486cdc Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Mon, 2 Mar 2015 22:57:30 +0100 Subject: [PATCH] updates on basic criteria advanced search pane --- CRM/Contact/Form/Search/Criteria.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CRM/Contact/Form/Search/Criteria.php b/CRM/Contact/Form/Search/Criteria.php index 8578b763af..63fc65bf97 100644 --- a/CRM/Contact/Form/Search/Criteria.php +++ b/CRM/Contact/Form/Search/Criteria.php @@ -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')); } -- 2.25.1