protected $_settings = array(
'search_autocomplete_count' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
'enable_innodb_fts' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'includeWildCardInName' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'includeEmailInName' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'includeNickNameInName' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'includeAlphabeticalPager' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'includeOrderByClause' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'smartGroupCacheTimeout' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'defaultSearchProfileID' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
);
/**
CRM_Utils_System::setTitle(ts('Settings - Search Preferences'));
// @todo remove the following adds in favour of setting via the settings array (above).
- $this->addYesNo('includeWildCardInName', ts('Automatic Wildcard'));
- $this->addYesNo('includeEmailInName', ts('Include Email'));
- $this->addYesNo('includeNickNameInName', ts('Include Nickname'));
-
- $this->addYesNo('includeAlphabeticalPager', ts('Include Alphabetical Pager'));
- $this->addYesNo('includeOrderByClause', ts('Include Order By Clause'));
-
- $this->addElement('text', 'smartGroupCacheTimeout', ts('Smart group cache timeout'),
- array('size' => 3, 'maxlength' => 5)
- );
-
- $types = array('Contact', 'Individual', 'Organization', 'Household');
- $profiles = CRM_Core_BAO_UFGroup::getProfiles($types);
-
- $this->add('select', 'defaultSearchProfileID', ts('Default Contact Search Profile'),
- array('' => ts('- none -')) + $profiles, FALSE, array('class' => 'crm-select2 huge')
- );
// Autocomplete for Contact Search (quick search etc.)
$options = array(
parent::buildQuickForm();
}
+ /**
+ * @return array
+ */
+ public static function getAvailableProfiles() {
+ return array('' => ts('- none -')) + CRM_Core_BAO_UFGroup::getProfiles(array(
+ 'Contact',
+ 'Individual',
+ 'Organization',
+ 'Household',
+ ));
+ }
+
}
'name' => 'includeOrderByClause',
'prefetch' => 1,
// prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
- 'config_only' => 1,
- //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 1,
'name' => 'includeWildCardInName',
'prefetch' => 1,
// prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
- 'config_only' => 1,
- //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 1,
'name' => 'includeEmailInName',
'prefetch' => 1,
// prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
- 'config_only' => 1,
- //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 1,
'name' => 'includeNickNameInName',
'prefetch' => 1,
// prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
- 'config_only' => 1,
- //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
- 'default' => 1,
+ 'default' => 0,
'add' => '4.6',
'title' => 'Include Nickname',
'is_domain' => 1,
'name' => 'includeAlphabeticalPager',
'prefetch' => 1,
// prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
- 'config_only' => 1,
- //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 1,
'name' => 'smartGroupCacheTimeout',
'prefetch' => 1,
// prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
- 'config_only' => 1,
- //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
'type' => 'Integer',
- 'quick_form_type' => 'Text',
- 'default' => 1,
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'default' => 5,
'add' => '4.6',
'title' => 'Smart group cache timeout',
'is_domain' => 1,
'name' => 'defaultSearchProfileID',
'prefetch' => 1,
// prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
- 'config_only' => 1,
- //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
'type' => 'Integer',
- 'quick_form_type' => 'Text',
- 'default' => 1,
+ 'quick_form_type' => 'Select',
+ 'html_type' => 'Select',
+ 'html_attributes' => array(
+ 'class' => 'crm-select2',
+ ),
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Admin_Form_Setting_Search::getAvailableProfiles',
+ ),
+ 'default' => NULL,
'add' => '4.6',
'title' => 'Default Contact Search Profile',
'is_domain' => 1,