Commit 913b6680 authored by Michael McAndrew's avatar Michael McAndrew
Browse files

upgrading to 4.3.5

parent f188ee64
......@@ -79,7 +79,7 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting {
static function formRule($fields, $files, $options) {
$errors = array();
if (is_array($fields['enableComponents'])) {
if (array_key_exists('enableComponents', $fields) && is_array($fields['enableComponents'])) {
if (in_array('CiviPledge', $fields['enableComponents']) &&
!in_array('CiviContribute', $fields['enableComponents'])
) {
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -283,6 +283,9 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form {
}
$this->setDefaults($this->_defaults);
// add in all state country selectors for enabled countries
CRM_Core_BAO_Address::fixAllStateSelects($this, $this->_defaults);
}
public function buildQuickForm() {
......@@ -584,6 +587,9 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form {
*/
function buildCustom($id, $name, $viewOnly = FALSE) {
// create state country map array to hold selectors
$stateCountryMap = array();
if ($id) {
$session = CRM_Core_Session::singleton();
$this->assign("petition", $this->petition);
......@@ -624,7 +630,15 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form {
// ignore file upload fields
continue;
}
// if state or country in the profile, create map
list($prefixName, $index) = CRM_Utils_System::explode('-', $key, 2);
if ($prefixName == 'state_province' || $prefixName == 'country' || $prefixName == 'county') {
if (!array_key_exists($index, $stateCountryMap)) {
$stateCountryMap[$index] = array();
}
$stateCountryMap[$index][$prefixName] = $key;
}
CRM_Core_BAO_UFGroup::buildProfile($this, $field, CRM_Profile_Form::MODE_CREATE, $contactID, TRUE);
$this->_fields[$key] = $field;
......@@ -633,6 +647,9 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form {
}
}
// initialize the state country map
CRM_Core_BAO_Address::addStateCountryMap($stateCountryMap);
if ($addCaptcha &&
!$viewOnly
) {
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment