CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, 'enable_innodb_fts' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, ); /** * Build the form object. * * @return void */ public function buildQuickForm() { CRM_Utils_System::setTitle(ts('Settings - Search Preferences')); $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( ts('Contact Name') => 1, ) + array_flip(CRM_Core_OptionGroup::values('contact_autocomplete_options', FALSE, FALSE, TRUE )); $this->addCheckBox('autocompleteContactSearch', ts('Autocomplete Contact Search'), $options, NULL, NULL, NULL, NULL, array('  ') ); $element = $this->getElement('autocompleteContactSearch'); $element->_elements[0]->_flagFrozen = TRUE; // Autocomplete for Contact Reference (custom fields) $optionsCR = array( ts('Contact Name') => 1, ) + array_flip(CRM_Core_OptionGroup::values('contact_reference_options', FALSE, FALSE, TRUE )); $this->addCheckBox('autocompleteContactReference', ts('Contact Reference Options'), $optionsCR, NULL, NULL, NULL, NULL, array('  ') ); $element = $this->getElement('autocompleteContactReference'); $element->_elements[0]->_flagFrozen = TRUE; parent::buildQuickForm(); } }