From ba021dc09077df85043207b3d5f50b61cf5d2906 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 26 Apr 2014 22:46:39 -0700 Subject: [PATCH] Add select2 to basic search --- CRM/Contact/Form/Search/Basic.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/Form/Search/Basic.php b/CRM/Contact/Form/Search/Basic.php index b5c337a65b..b8197dd9ee 100644 --- a/CRM/Contact/Form/Search/Basic.php +++ b/CRM/Contact/Form/Search/Basic.php @@ -73,7 +73,9 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search { $contactTypes = array('' => ts('- any contact type -')) + CRM_Contact_BAO_ContactType::getSelectElements(); $this->add('select', 'contact_type', ts('is...'), - $contactTypes + $contactTypes, + FALSE, + array('class' => 'crm-select2') ); } @@ -83,15 +85,14 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search { // add select for groups $group = array('' => ts('- any group -')) + $groupHierarchy; - $this->_groupElement = &$this->addElement('select', 'group', ts('in'), $group); + $this->add('select', 'group', ts('in'), $group, FALSE, array('class' => 'crm-select2')); } if (!empty($searchOptions['tags'])) { // tag criteria if (!empty($this->_tag)) { - $tag = array( - '' => ts('- any tag -')) + $this->_tag; - $this->_tagElement = &$this->addElement('select', 'tag', ts('with'), $tag); + $tag = array('' => ts('- any tag -')) + $this->_tag; + $this->add('select', 'tag', ts('with'), $tag, FALSE, array('class' => 'crm-select2')); } } -- 2.25.1