<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for the display preferences
- *
+ * This class generates form components for the display preferences.
*/
class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences {
protected $_settings = array(
'cvv_backoffice_required' => CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,
);
+
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function preProcess() {
$config = CRM_Core_Config::singleton();
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
//CRM-16691: Changes made related to settings of 'CVV'.
$this->assign("{$setting}_description", ts($props['description']));
}
$this->add('checkbox', 'invoicing', ts('Enable Tax and Invoicing'));
+ $this->add('checkbox', 'acl_financial_type', ts('Enable Access Control by Financial Type'));
parent::buildQuickForm();
}
/**
* Set default values for the form.
- * default values are retrieved from the database
- *
*
- * @return void
+ * default values are retrieved from the database
*/
public function setDefaultValues() {
- $defaults = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $defaults = Civi::settings()->get('contribution_invoice_settings');
//CRM-16691: Changes made related to settings of 'CVV'.
foreach ($this->_settings as $setting => $group) {
$settingMetaData = civicrm_api3('setting', 'getfields', array('name' => $setting));
/**
* Process the form after the input has been submitted and validated.
- *
- *
- * @return void
*/
public function postProcess() {
// store the submitted values in an array