<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* This class generates form components for Address Section
*/
class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences {
- function preProcess() {
+ public function preProcess() {
CRM_Utils_System::setTitle(ts('Settings - Addresses'));
// Address Standardization
$addrProviders = array(
- '' => '- select -') + CRM_Core_SelectValues::addressProvider();
+ '' => '- select -',
+ ) + CRM_Core_SelectValues::addressProvider();
$this->_varNames = array(
- CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME =>
- array(
+ CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME => array(
'address_options' => array(
'html_type' => 'checkboxes',
'title' => ts('Address Fields'),
'weight' => 3,
),
),
- CRM_Core_BAO_Setting::ADDRESS_STANDARDIZATION_PREFERENCES_NAME =>
- array(
+ CRM_Core_BAO_Setting::ADDRESS_STANDARDIZATION_PREFERENCES_NAME => array(
'address_standardization_provider' => array(
'html_type' => 'select',
'title' => ts('Provider'),
/**
* @return array
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
$defaults = array();
$defaults['address_standardization_provider'] = $this->_config->address_standardization_provider;
$defaults['address_standardization_userid'] = $this->_config->address_standardization_userid;
$defaults['address_standardization_url'] = $this->_config->address_standardization_url;
-
$this->addressSequence = isset($newSequence) ? $newSequence : "";
if (empty($this->_config->address_format)) {
$defaults['mailing_format'] = $this->_config->mailing_format;
}
-
parent::cbsDefaultValues($defaults);
return $defaults;
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->applyFilter('__ALL__', 'trim');
*
* @return bool
*/
- static function formRule($fields) {
+ public static function formRule($fields) {
$p = $fields['address_standardization_provider'];
$u = $fields['address_standardization_userid'];
$w = $fields['address_standardization_url'];
}
/**
- * Function to process the form
+ * Process the form submission
*
- * @access public
*
* @return void
*/
$this->_params = $this->controller->exportValues($this->_name);
-
// check if county option has been set
$options = CRM_Core_OptionGroup::values('address_options', FALSE, FALSE, TRUE);
foreach ($options as $key => $title) {
$this->postProcessCommon();
}
- //end of function
}
-