本文整理汇总了PHP中CRM_Admin_Form_Setting类的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Admin_Form_Setting类的具体用法?PHP CRM_Admin_Form_Setting怎么用?PHP CRM_Admin_Form_Setting使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CRM_Admin_Form_Setting类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildQuickForm
/**
* Build the form object.
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)'));
$this->assign('validTriggerPermission', CRM_Core_DAO::checkTriggerViewPermission(FALSE));
$this->addFormRule(array('CRM_Admin_Form_Setting_Miscellaneous', 'formRule'), $this);
parent::buildQuickForm();
$this->addRule('checksum_timeout', ts('Value should be a positive number'), 'positiveInteger');
}
示例2: buildQuickForm
/**
* Build the form object.
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Settings - CiviMail'));
$check = TRUE;
// redirect to Administer Section After hitting either Save or Cancel button.
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
$this->addFormRule(array('CRM_Admin_Form_Setting_Mail', 'formRule'));
parent::buildQuickForm($check);
}
示例3: buildQuickForm
/**
* Build the form object.
*
* @return void
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)'));
$this->assign('validTriggerPermission', CRM_Core_DAO::checkTriggerViewPermission(FALSE));
$this->addElement('text', 'wkhtmltopdfPath', ts('Path to wkhtmltopdf executable'), array('size' => 64, 'maxlength' => 256));
$this->addElement('text', 'recaptchaPublicKey', ts('Public Key'), array('size' => 64, 'maxlength' => 64));
$this->addElement('text', 'recaptchaPrivateKey', ts('Private Key'), array('size' => 64, 'maxlength' => 64));
$this->addElement('text', 'dashboardCacheTimeout', ts('Dashboard cache timeout'), array('size' => 3, 'maxlength' => 5));
$this->addElement('text', 'recaptchaOptions', ts('Recaptcha Options'), array('size' => 64, 'maxlength' => 64));
$this->addFormRule(array('CRM_Admin_Form_Setting_Miscellaneous', 'formRule'), $this);
parent::buildQuickForm();
$this->addRule('checksumTimeout', ts('Value should be a positive number'), 'positiveInteger');
}
示例4: buildQuickForm
/**
* Function to build the form
*
* @return None
* @access public
*/
public function buildQuickForm()
{
$outBoundOption = array('0' => ts('SMTP'), '1' => ts('Sendmail'), '2' => ts('Disable Outbound Email'));
$this->addRadio('outBound_option', ts('Select Mailer'), $outBoundOption);
CRM_Utils_System::setTitle(ts('Settings - Outbound Mail'));
$this->add('text', 'sendmail_path', ts('Sendmail Path'));
$this->add('text', 'sendmail_args', ts('Sendmail Argument'));
$this->add('text', 'smtpServer', ts('SMTP Server'));
$this->add('text', 'smtpPort', ts('SMTP Port'));
$this->addYesNo('smtpAuth', ts('Authentication?'));
$this->addElement('text', 'smtpUsername', ts('SMTP Username'));
$this->addElement('password', 'smtpPassword', ts('SMTP Password'));
$this->_testButtonName = $this->getButtonName('refresh', 'test');
$this->add('submit', $this->_testButtonName, ts('Save & Send Test Email'));
$this->addFormRule(array('CRM_Admin_Form_Setting_Smtp', 'formRule'));
parent::buildQuickForm();
}
示例5: buildQuickForm
/**
* Function to build the form
*
* @return void
* @access public
*/
public function buildQuickForm()
{
$outBoundOption = array(CRM_Mailing_Config::OUTBOUND_OPTION_MAIL => ts('mail()'), CRM_Mailing_Config::OUTBOUND_OPTION_SMTP => ts('SMTP'), CRM_Mailing_Config::OUTBOUND_OPTION_SENDMAIL => ts('Sendmail'), CRM_Mailing_Config::OUTBOUND_OPTION_DISABLED => ts('Disable Outbound Email'), CRM_Mailing_Config::OUTBOUND_OPTION_REDIRECT_TO_DB => ts('Redirect to Database'));
$this->addRadio('outBound_option', ts('Select Mailer'), $outBoundOption);
CRM_Utils_System::setTitle(ts('Settings - Outbound Mail'));
$this->add('text', 'sendmail_path', ts('Sendmail Path'));
$this->add('text', 'sendmail_args', ts('Sendmail Argument'));
$this->add('text', 'smtpServer', ts('SMTP Server'));
$this->add('text', 'smtpPort', ts('SMTP Port'));
$this->addYesNo('smtpAuth', ts('Authentication?'));
$this->addElement('text', 'smtpUsername', ts('SMTP Username'));
$this->addElement('password', 'smtpPassword', ts('SMTP Password'));
$this->_testButtonName = $this->getButtonName('refresh', 'test');
$this->add('submit', $this->_testButtonName, ts('Save & Send Test Email'));
$this->addFormRule(array('CRM_Admin_Form_Setting_Smtp', 'formRule'));
parent::buildQuickForm();
}
示例6: buildQuickForm
/**
* Build the form object.
*/
public function buildQuickForm()
{
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(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();
}
示例7: buildQuickForm
/**
* Function to build the form
*
* @return void
* @access public
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts(' Settings - Debugging and Error Handling '));
if (CRM_Core_Config::singleton()->userSystem->supports_UF_Logging == '1') {
$this->_settings['userFrameworkLogging'] = CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME;
}
parent::buildQuickForm();
}
示例8: buildQuickForm
/**
* Function to build the form
*
* @return None
* @access public
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Settings - Mapping Provider'));
$map = CRM_Core_SelectValues::mapProvider();
$this->addElement('select', 'mapProvider', ts('Map Provider'), array('' => '- select -') + $map);
$this->add('text', 'mapAPIKey', ts('Provider Key'), null);
parent::buildQuickForm();
}
示例9: buildQuickForm
/**
* Function to build the form
*
* @return void
* @access public
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Settings - Simple donate form'));
$attributes = array('entity' => 'Contribution', 'field' => 'contribution_page_id', 'option_url' => NULL);
$this->addSelect('simpleDonation', $attributes, TRUE);
$this->addElement('checkbox', "ziptastic", ts('Is Ziptastic enabled?'));
parent::buildQuickForm();
}
示例10: setDefaultValues
public function setDefaultValues()
{
$defaults = parent::setDefaultValues();
$defaults['selected_profile'] = 'Default';
$defaults['pdfinfo_path'] = CRM_Donrec_Logic_Settings::get('donrec_pdfinfo_path');
$defaults['packet_size'] = CRM_Donrec_Logic_Settings::get('donrec_packet_size');
return $defaults;
}
示例11: buildQuickForm
/**
* Function to build the form
*
* @return None
* @access public
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Settings - Miscellaneous'));
$this->addYesNo('versionCheck', ts('Version Check & Statistics Reporting'));
$this->addElement('text', 'maxAttachments', ts('Maximum Attachments'), array('size' => 2, 'maxlength' => 8));
$this->addElement('text', 'recaptchaPublicKey', ts('Public Key'), array('size' => 64, 'maxlength' => 64));
$this->addElement('text', 'recaptchaPrivateKey', ts('Private Key'), array('size' => 64, 'maxlength' => 64));
parent::buildQuickForm();
}
示例12: postProcess
public function postProcess()
{
parent::postProcess();
// handle logging
// FIXME: do it only if the setting changed
require_once 'CRM/Logging/Schema.php';
$values = $this->exportValues();
$logging = new CRM_Logging_Schema();
$values['logging'] ? $logging->enableLogging() : $logging->disableLogging();
}
示例13: buildQuickForm
/**
* Build the form object.
*
* @return void
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Settings - Date'));
$this->addElement('text', 'dateformatDatetime', ts('Complete Date and Time'));
$this->addElement('text', 'dateformatFull', ts('Complete Date'));
$this->addElement('text', 'dateformatPartial', ts('Month and Year'));
$this->addElement('text', 'dateformatYear', ts('Year Only'));
$this->addElement('text', 'dateformatTime', ts('Time Only'));
parent::buildQuickForm();
}
示例14: buildQuickForm
/**
* Function to build the form
*
* @return None
* @access public
*/
public function buildQuickForm()
{
CRM_Utils_System::setTitle(ts('Settings - Mapping and Geocoding Providers'));
$map = CRM_Core_SelectValues::mapProvider();
$geo = CRM_Core_SelectValues::geoProvider();
$this->addElement('select', 'mapProvider', ts('Mapping Provider'), array('' => '- select -') + $map, array('onChange' => 'showHideMapAPIkey( this.value );'));
$this->add('text', 'mapAPIKey', ts('Map Provider Key'), NULL);
$this->addElement('select', 'geoProvider', ts('Geocoding Provider'), array('' => '- select -') + $geo, array('onChange' => 'showHideGeoAPIkey( this.value );'));
$this->add('text', 'geoAPIKey', ts('Geo Provider Key'), NULL);
parent::buildQuickForm();
}
示例15: postProcess
public function postProcess()
{
// if extensions url is set, lets clear session status messages to avoid
// a potentially spurious message which might already have been set. This
// is a bit hackish
// CRM-10629
$session = CRM_Core_Session::singleton();
$session->getStatus(TRUE);
parent::postProcess();
parent::rebuildMenu();
}