From d236326e97e94b1ea3505a45ce7d898660a10735 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Sat, 11 Nov 2017 15:15:14 +0530 Subject: [PATCH] replace element with advmultiselect --- CRM/Admin/Form/Preferences.php | 8 ++++++-- CRM/Admin/Form/Preferences/Display.php | 10 +++++++--- settings/Core.setting.php | 10 ++++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CRM/Admin/Form/Preferences.php b/CRM/Admin/Form/Preferences.php index 43d1455dd4..1bd8a4dd01 100644 --- a/CRM/Admin/Form/Preferences.php +++ b/CRM/Admin/Form/Preferences.php @@ -196,11 +196,14 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form { $this->addElement('select', $fieldName, $fieldValue['title'], - $fieldValue['option_values'], - CRM_Utils_Array::value('attributes', $fieldValue) + $fieldValue['option_values'] ); break; + case 'advmultiselect': + $this->addElement('advmultiselect', $fieldName, $fieldValue['title'], $fieldValue['options'], $fieldValue['attributes']); + break; + case 'wysiwyg': $this->add('wysiwyg', $fieldName, $fieldValue['title'], $fieldValue['attributes']); break; @@ -273,6 +276,7 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form { case 'text': case 'select': + case 'advmultiselect': case 'radio': case 'YesNo': case 'entity_reference': diff --git a/CRM/Admin/Form/Preferences/Display.php b/CRM/Admin/Form/Preferences/Display.php index 2d20d89210..23221ebc8f 100644 --- a/CRM/Admin/Form/Preferences/Display.php +++ b/CRM/Admin/Form/Preferences/Display.php @@ -106,9 +106,13 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { 'weight' => 13, ), 'filter_activity_type_notification' => array( - 'html_type' => 'select', - 'option_values' => $optionValues, - 'attributes' => array('multiple' => 1, "class" => "crm-select2"), + 'html_type' => 'advmultiselect', + 'options' => $optionValues, + 'attributes' => array( + 'size' => 5, + 'style' => 'width:150px', + 'class' => 'advmultiselect', + ), 'title' => ts('Blocked Activity Types.'), 'weight' => 14, ), diff --git a/settings/Core.setting.php b/settings/Core.setting.php index ec93ba8a9b..81158731e8 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -975,17 +975,19 @@ return array( 'add' => '4.7', 'is_domain' => 1, 'is_contact' => 0, + 'default' => array(), 'description' => 'Select Activity types to disable assignee notifications.', 'title' => 'Filter Activity Type Notification', 'help_text' => '', - 'html_type' => 'Select', + 'html_type' => 'advmultiselect', 'html_attributes' => array( - 'multiple' => 1, - 'class' => 'crm-select2', + 'size' => 5, + 'style' => 'width:150px', + 'class' => 'advmultiselect', ), 'pseudoconstant' => array( 'optionGroupName' => 'activity_type', ), - 'quick_form_type' => 'Select', + 'quick_form_type' => 'Element', ), ); -- 2.25.1