From 2e94f477361b7de070c1942036a6f361566da243 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 8 Oct 2018 22:00:15 +0100 Subject: [PATCH] Convert Contact Search to metadata driven --- CRM/Admin/Form/Preferences/Display.php | 6 +----- CRM/Admin/Form/SettingTrait.php | 2 +- settings/Core.setting.php | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CRM/Admin/Form/Preferences/Display.php b/CRM/Admin/Form/Preferences/Display.php index 0a078de443..1a23425e27 100644 --- a/CRM/Admin/Form/Preferences/Display.php +++ b/CRM/Admin/Form/Preferences/Display.php @@ -39,6 +39,7 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { protected $_settings = array( 'contact_view_options' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_smart_group_display' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, + 'advanced_search_options' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, ); public function preProcess() { @@ -52,11 +53,6 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { 'title' => ts('Editing Contacts'), 'weight' => 3, ), - 'advanced_search_options' => array( - 'html_type' => 'checkboxes', - 'title' => ts('Contact Search'), - 'weight' => 4, - ), 'activity_assignee_notification' => array( 'html_type' => 'checkbox', 'title' => ts('Notify Activity Assignees'), diff --git a/CRM/Admin/Form/SettingTrait.php b/CRM/Admin/Form/SettingTrait.php index 23c1adb039..6a9f7e5f79 100644 --- a/CRM/Admin/Form/SettingTrait.php +++ b/CRM/Admin/Form/SettingTrait.php @@ -234,7 +234,7 @@ trait CRM_Admin_Form_SettingTrait { protected function saveMetadataDefinedSettings($params) { $settings = $this->getSettingsToSetByMetadata($params); foreach ($settings as $setting => $settingValue) { - if ($this->getSettingMetadataItem($setting, 'quick_form_type') === 'CheckBoxes') { + if ($this->getQuickFormType($this->getSettingMetadata($setting)) === 'CheckBoxes') { $settings[$setting] = array_keys($settingValue); } } diff --git a/settings/Core.setting.php b/settings/Core.setting.php index fd0c2b2419..5c279417f7 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -89,6 +89,7 @@ return array( 'is_domain' => 1, 'is_contact' => 0, 'description' => ts('Select the sections that should be included in the Basic and Advanced Search forms. EXAMPLE: If you don\'t track Relationships - then you do not need this section included in the advanced search form. Simplify the form by un-checking this option.'), + 'serialize' => CRM_Core_DAO::SERIALIZE_SEPARATOR_BOOKEND, ), 'user_dashboard_options' => array( 'group_name' => 'CiviCRM Preferences', -- 2.25.1