当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Admin_Form_Setting::buildQuickForm方法代码示例

本文整理汇总了PHP中CRM_Admin_Form_Setting::buildQuickForm方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Admin_Form_Setting::buildQuickForm方法的具体用法?PHP CRM_Admin_Form_Setting::buildQuickForm怎么用?PHP CRM_Admin_Form_Setting::buildQuickForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Admin_Form_Setting的用法示例。


在下文中一共展示了CRM_Admin_Form_Setting::buildQuickForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildQuickForm

 /**
  * Build the form object.
  */
 public function buildQuickForm()
 {
     $config = CRM_Core_Config::singleton();
     CRM_Utils_System::setTitle(ts('Settings - Localization'));
     $warningTitle = json_encode(ts("Warning"));
     $defaultLocaleOptions = CRM_Admin_Form_Setting_Localization::getDefaultLocaleOptions();
     $domain = new CRM_Core_DAO_Domain();
     $domain->find(TRUE);
     if ($domain->locales) {
         // add language limiter and language adder
         $this->addCheckBox('languageLimit', ts('Available Languages'), array_flip($defaultLocaleOptions), NULL, NULL, NULL, NULL, '   ');
         $this->addElement('select', 'addLanguage', ts('Add Language'), array_merge(array('' => ts('- select -')), array_diff(CRM_Core_I18n::languages(), $defaultLocaleOptions)));
         // add the ability to return to single language
         $warning = ts('This will make your CiviCRM installation a single-language one again. THIS WILL DELETE ALL DATA RELATED TO LANGUAGES OTHER THAN THE DEFAULT ONE SELECTED ABOVE (and only that language will be preserved).');
         $this->assign('warning', $warning);
         $warning = json_encode($warning);
         $this->addElement('checkbox', 'makeSinglelingual', ts('Return to Single Language'), NULL, array('onChange' => "if (this.checked) CRM.alert({$warning}, {$warningTitle})"));
     } else {
         $warning = ts('Enabling multiple languages changes the schema of your database, so make sure you know what you are doing when enabling this function; making a database backup is strongly recommended.');
         $this->assign('warning', $warning);
         $warning = json_encode($warning);
         $validTriggerPermission = CRM_Core_DAO::checkTriggerViewPermission(TRUE);
         if ($validTriggerPermission && !$config->logging) {
             $this->addElement('checkbox', 'makeMultilingual', ts('Enable Multiple Languages'), NULL, array('onChange' => "if (this.checked) CRM.alert({$warning}, {$warningTitle})"));
         }
     }
     $this->addElement('select', 'contact_default_language', ts('Default Language for users'), CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions());
     $includeCurrency =& $this->addElement('advmultiselect', 'currencyLimit', ts('Available Currencies') . ' ', self::getCurrencySymbols(), array('size' => 5, 'style' => 'width:150px', 'class' => 'advmultiselect'));
     $includeCurrency->setButtonAttributes('add', array('value' => ts('Add >>')));
     $includeCurrency->setButtonAttributes('remove', array('value' => ts('<< Remove')));
     $this->addFormRule(array('CRM_Admin_Form_Setting_Localization', 'formRule'));
     parent::buildQuickForm();
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:36,代码来源:Localization.php

示例2: buildQuickForm

 /**
  * Function to build the form
  *
  * @return None
  * @access public
  */
 public function buildQuickForm()
 {
     CRM_Utils_System::setTitle(ts('Settings - Undelete, Logging and ReCAPTCHA'));
     $this->addYesNo('contactUndelete', ts('Contact Trash & Undelete'));
     // also check if we can enable triggers
     $validTriggerPermission = CRM_Core_DAO::checkTriggerViewPermission(FALSE);
     // FIXME: for now, disable logging for multilingual sites OR if triggers are not permittted
     $domain = new CRM_Core_DAO_Domain();
     $domain->find(TRUE);
     $attribs = $domain->locales || !$validTriggerPermission ? array('disabled' => 'disabled') : NULL;
     $this->assign('validTriggerPermission', $validTriggerPermission);
     $this->addYesNo('logging', ts('Logging'), NULL, NULL, $attribs);
     $this->addYesNo('versionCheck', ts('Version Check & Statistics Reporting'));
     $this->addYesNo('doNotAttachPDFReceipt', ts('Attach PDF copy to receipts'));
     $this->addElement('text', 'wkhtmltopdfPath', ts('Path to wkhtmltopdf executable'), array('size' => 64, 'maxlength' => 256));
     $this->addElement('text', 'maxAttachments', ts('Maximum Attachments'), array('size' => 2, 'maxlength' => 8));
     $this->addElement('text', 'maxFileSize', ts('Maximum File Size'), 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));
     $this->addElement('text', 'dashboardCacheTimeout', ts('Dashboard cache timeout'), array('size' => 3, 'maxlength' => 5));
     $this->addElement('text', 'checksumTimeout', ts('CheckSum Lifespan'), array('size' => 2, 'maxlength' => 8));
     $this->addElement('text', 'recaptchaOptions', ts('Recaptcha Options'), array('size' => 64, 'maxlength' => 64));
     $this->addRule('maxAttachments', ts('Value should be a positive number'), 'positiveInteger');
     $this->addRule('maxFileSize', ts('Value should be a positive number'), 'positiveInteger');
     $this->addRule('checksumTimeout', ts('Value should be a positive number'), 'positiveInteger');
     parent::buildQuickForm();
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:33,代码来源:Miscellaneous.php

示例3: 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('&nbsp;&nbsp;'));
     $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('&nbsp;&nbsp;'));
     $element = $this->getElement('autocompleteContactReference');
     $element->_elements[0]->_flagFrozen = TRUE;
     parent::buildQuickForm();
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:28,代码来源:Search.php

示例4: 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');
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:11,代码来源:Miscellaneous.php

示例5: 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();
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:14,代码来源:Mapping.php

示例6: 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();
 }
开发者ID:rohankatkar,项目名称:com.webaccessglobal.simpledonate,代码行数:14,代码来源:SimpleDonationSetting.php

示例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();
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:14,代码来源:Debugging.php

示例8: 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();
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:15,代码来源:Miscellaneous.php

示例9: buildQuickForm

 /**
  * Build the form object.
  *
  * @return void
  */
 public function buildQuickForm()
 {
     CRM_Utils_System::setTitle(ts('Settings - Enable Components'));
     $components = $this->_getComponentSelectValues();
     $include =& $this->addElement('advmultiselect', 'enableComponents', ts('Components') . ' ', $components, array('size' => 5, 'style' => 'width:150px', 'class' => 'advmultiselect'));
     $include->setButtonAttributes('add', array('value' => ts('Enable >>')));
     $include->setButtonAttributes('remove', array('value' => ts('<< Disable')));
     $this->addFormRule(array('CRM_Admin_Form_Setting_Component', 'formRule'), $this);
     parent::buildQuickForm();
 }
开发者ID:kidaa30,项目名称:yes,代码行数:15,代码来源:Component.php

示例10: buildQuickForm

 public function buildQuickForm()
 {
     // load realtionships
     $relationshipOptions = $this->getEligibleRelationships();
     $this->addElement('select', 'hh_mode', ts('Household Mode', array('domain' => 'de.systopia.householdmerge')), CRM_Householdmerge_Logic_Configuration::getHouseholdModeOptions(), array('class' => 'crm-select2'));
     $this->addElement('select', 'hh_head_mode', ts('Household Head Mode', array('domain' => 'de.systopia.householdmerge')), CRM_Householdmerge_Logic_Configuration::getHouseholdHeadModeOptions(), array('class' => 'crm-select2'));
     $this->addElement('select', 'hh_member_relation', ts('Household Member Relationship', array('domain' => 'de.systopia.householdmerge')), $relationshipOptions, array('class' => 'crm-select2'));
     $this->addElement('select', 'hh_head_relation', ts('Household Head Relationship', array('domain' => 'de.systopia.householdmerge')), $relationshipOptions, array('class' => 'crm-select2'));
     parent::buildQuickForm();
 }
开发者ID:systopia,项目名称:de.systopia.householdmerge,代码行数:10,代码来源:Household.php

示例11: 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);
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:13,代码来源:Mail.php

示例12: buildQuickForm

 /**
  * Function to build the form
  *
  * @return None
  * @access public
  */
 public function buildQuickForm()
 {
     CRM_Utils_System::setTitle(ts('Settings - Resource URLs'));
     $this->addElement('text', 'userFrameworkResourceURL', ts('CiviCRM Resource URL'));
     $this->addElement('text', 'imageUploadURL', ts('Image Upload URL'));
     $this->addElement('text', 'customCSSURL', ts('Custom CiviCRM CSS URL'));
     $this->addYesNo('enableSSL', ts('Force Secure URLs (SSL)'));
     $this->addFormRule(array('CRM_Admin_Form_Setting_Url', 'formRule'));
     parent::buildQuickForm();
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:16,代码来源:Url.php

示例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();
 }
开发者ID:scardinius,项目名称:civicrm-core-api-mailing,代码行数:15,代码来源:Date.php

示例14: buildQuickForm

 /**
  * Build the form object.
  */
 public function buildQuickForm()
 {
     CRM_Utils_System::setTitle(ts('Settings - Upload Directories'));
     $directories = array('uploadDir' => ts('Temporary Files'), 'imageUploadDir' => ts('Images'), 'customFileUploadDir' => ts('Custom Files'), 'customTemplateDir' => ts('Custom Templates'), 'customPHPPathDir' => ts('Custom PHP Path Directory'), 'extensionsDir' => ts('CiviCRM Extensions Directory'));
     foreach ($directories as $name => $title) {
         $this->add('text', $name, $title);
         $this->addRule($name, ts("'%1' directory does not exist", array(1 => $title)), 'fileExists');
     }
     parent::buildQuickForm();
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:13,代码来源:Path.php

示例15: buildQuickForm

 /**
  * Build the form object.
  */
 public function buildQuickForm()
 {
     CRM_Utils_System::setTitle(ts('Settings - Resource URLs'));
     $settingFields = civicrm_api('setting', 'getfields', array('version' => 3));
     $this->addYesNo('enableSSL', ts('Force Secure URLs (SSL)'));
     $this->addYesNo('verifySSL', ts('Verify SSL Certs'));
     // FIXME: verifySSL should use $_settings instead of manually adding fields
     $this->assign('verifySSL_description', $settingFields['values']['verifySSL']['description']);
     $this->addFormRule(array('CRM_Admin_Form_Setting_Url', 'formRule'));
     parent::buildQuickForm();
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:14,代码来源:Url.php


注:本文中的CRM_Admin_Form_Setting::buildQuickForm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。