From: Coleman Watts Date: Tue, 3 Jun 2014 21:41:01 +0000 (+0100) Subject: Add select2 to group lists X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7310566a3e7738bd3df7451508b4fee224822684;p=civicrm-core.git Add select2 to group lists --- diff --git a/CRM/ACL/Form/EntityRole.php b/CRM/ACL/Form/EntityRole.php index 371217cb78..9e21e49334 100644 --- a/CRM/ACL/Form/EntityRole.php +++ b/CRM/ACL/Form/EntityRole.php @@ -66,7 +66,7 @@ class CRM_ACL_Form_EntityRole extends CRM_Admin_Form { $label = ts('Assigned To'); $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::staticGroup(FALSE, 'Access'); - $this->add('select', 'entity_id', $label, $group, TRUE); + $this->add('select', 'entity_id', $label, $group, TRUE, array('class' => 'crm-select2 huge')); $this->add('checkbox', 'is_active', ts('Enabled?')); } diff --git a/CRM/Contact/Form/DedupeFind.php b/CRM/Contact/Form/DedupeFind.php index 1b6b242e8f..6fd1a9063f 100644 --- a/CRM/Contact/Form/DedupeFind.php +++ b/CRM/Contact/Form/DedupeFind.php @@ -67,7 +67,7 @@ class CRM_Contact_Form_DedupeFind extends CRM_Admin_Form { $groupList[''] = ts('- All Contacts -'); asort($groupList); - $this->add('select', 'group_id', ts('Select Group'), $groupList); + $this->add('select', 'group_id', ts('Select Group'), $groupList, FALSE, array('class' => 'crm-select2 huge')); $this->addButtons(array( array( 'type' => 'next', diff --git a/CRM/Contact/Form/Task/AddToGroup.php b/CRM/Contact/Form/Task/AddToGroup.php index e8e69aca61..dac5896230 100644 --- a/CRM/Contact/Form/Task/AddToGroup.php +++ b/CRM/Contact/Form/Task/AddToGroup.php @@ -127,7 +127,7 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task { // add select for groups $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::group(); - $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group); + $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, FALSE, array('class' => 'crm-select2 huge')); $this->_title = $group[$this->_id]; diff --git a/CRM/Contact/Form/Task/RemoveFromGroup.php b/CRM/Contact/Form/Task/RemoveFromGroup.php index 61bd59f778..a75b0918ca 100644 --- a/CRM/Contact/Form/Task/RemoveFromGroup.php +++ b/CRM/Contact/Form/Task/RemoveFromGroup.php @@ -50,7 +50,7 @@ class CRM_Contact_Form_Task_RemoveFromGroup extends CRM_Contact_Form_Task { function buildQuickForm() { // add select for groups $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::group(); - $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, TRUE); + $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, TRUE, array('class' => 'crm-select2 huge')); CRM_Utils_System::setTitle(ts('Remove Contacts from Group')); $this->addDefaultButtons(ts('Remove from Group'));