CRM-14801 - fix notices and fix code so option_values for Address Provider are passed...
authorDave Greenberg <dave@civicrm.org>
Thu, 5 Jun 2014 21:35:52 +0000 (14:35 -0700)
committerDave Greenberg <dave@civicrm.org>
Thu, 5 Jun 2014 21:35:52 +0000 (14:35 -0700)
----------------------------------------
* CRM-14801:
  https://issues.civicrm.org/jira/browse/CRM-14801

CRM/Admin/Form/Preferences/Address.php

index 51a036ec55d09e412b6d1c489b41c7f28a9c4a64..1f6b0cb80d635b91bca6e9674ffa3bb029ba807e 100644 (file)
@@ -41,6 +41,9 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences {
 
     CRM_Utils_System::setTitle(ts('Settings - Addresses'));
 
+    // Address Standardization
+    $addrProviders = array(
+      '' => '- select -') + CRM_Core_SelectValues::addressProvider();
 
     $this->_varNames = array(
       CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME =>
@@ -67,6 +70,8 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences {
       array(
         'address_standardization_provider' => array(
           'html_type' => 'select',
+          'title' => ts('Provider'),
+          'option_values' => $addrProviders,
           'weight' => 4,
         ),
         'address_standardization_userid' => array(
@@ -141,15 +146,6 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences {
   public function buildQuickForm() {
     $this->applyFilter('__ALL__', 'trim');
 
-    // Address Standardization
-    $addrProviders = CRM_Core_SelectValues::addressProvider();
-    $this->addElement('select',
-      'address_standardization_provider',
-      ts('Address Provider'),
-      array(
-        '' => '- select -') + $addrProviders
-    );
-
     $this->addFormRule(array('CRM_Admin_Form_Preferences_Address', 'formRule'));
 
     //get the tokens for Mailing Label field