Camel casing fix for
authormonishdeb <monish.deb@webaccess.co.in>
Wed, 6 Nov 2013 13:46:25 +0000 (19:16 +0530)
committermonishdeb <monish.deb@webaccess.co.in>
Wed, 6 Nov 2013 13:46:25 +0000 (19:16 +0530)
CRM/Contribute/Form/Contribution/OnBehalfOf.php
CRM/Contribute/Form/ContributionBase.php
CRM/Profile/Form.php

index 2c62bcaa23d4e1393050c2cc8990fc1d423756d6..6807fd3cdc9bcdda7faa9c9fc64fc6625e0673ee 100644 (file)
@@ -152,7 +152,7 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf {
     }
 
     $stateCountryMap = array();
-    $location_type_id = null;
+    $locationTypeId = null;
     foreach ($profileFields as $name => $field) {
       if (in_array($field['field_type'], $fieldTypes)) {
         list($prefixName, $index) = CRM_Utils_System::explode('-', $name, 2);
@@ -165,10 +165,10 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf {
           $stateCountryMap[$index][$prefixName] = 'onbehalf[' . $name . ']';
 
           if (count($form->_submitValues)) {
-            $location_type_id = $field['location_type_id'];
-            if(!empty($form->_submitValues['onbehalf']["country-{$location_type_id}"]) &&
+            $locationTypeId = $field['location_type_id'];
+            if (!empty($form->_submitValues['onbehalf']["country-{$locationTypeId}"]) &&
               $prefixName == "state_province") {
-              $field['is_required'] = CRM_Core_Payment_Form::checkRequiredStateProvince($form, "country-{$location_type_id}", TRUE);
+              $field['is_required'] = CRM_Core_Payment_Form::checkRequiredStateProvince($form, "country-{$locationTypeId}", TRUE);
             }
           }
         }
index 23a3b24b8efd794566f09f8914bc88dbffb053aa..8a6f17b63c7612c331cdfcbda4df5acb8ee5fb2c 100644 (file)
@@ -714,12 +714,12 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
               }
               else {
                 if (count($this->_submitValues)) {
-                  $location_type_id = $field['location_type_id'];
-                  if (array_key_exists("country-{$location_type_id}", $fields) &&
-                  array_key_exists("state_province-{$location_type_id}", $fields) &&
-                    !empty($this->_submitValues["country-{$location_type_id}"])) {
+                  $locationTypeId = $field['location_type_id'];
+                  if (array_key_exists("country-{$locationTypeId}", $fields) &&
+                  array_key_exists("state_province-{$locationTypeId}", $fields) &&
+                    !empty($this->_submitValues["country-{$locationTypeId}"])) {
                     $field['is_required'] =
-                      CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$location_type_id}");
+                      CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$locationTypeId}");
                   }
                 }
               }
index c55b089dd8471f93b734fee1e6810e10a5fd568e..066c4396bffe563b23a5839a1521daab3e22f926 100644 (file)
@@ -681,16 +681,16 @@ class CRM_Profile_Form extends CRM_Core_Form {
     }
 
     if (count($this->_submitValues)) {
-      $location_type_id = null;
+      $locationTypeId = null;
       foreach ($this->_fields as $field) {
         if (!empty($field['location_type_id'])) {
-          $location_type_id = $field['location_type_id'];
+          $locationTypeId = $field['location_type_id'];
         }
-        if (array_key_exists("country-{$location_type_id}", $this->_fields) &&
-          array_key_exists("state_province-{$location_type_id}", $this->_fields) &&
-          !empty($this->_submitValues["country-{$location_type_id}"])) {
-          $this->_fields["state_province-{$location_type_id}"]['is_required'] =
-            CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$location_type_id}");
+        if (array_key_exists("country-{$locationTypeId}", $this->_fields) &&
+          array_key_exists("state_province-{$locationTypeId}", $this->_fields) &&
+          !empty($this->_submitValues["country-{$locationTypeId}"])) {
+          $this->_fields["state_province-{$locationTypeId}"]['is_required'] =
+            CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$locationTypeId}");
         }
       }
     }