$blockId = $addressBlockCount;
}
- $config = CRM_Core_Config::singleton();
- $countryDefault = $config->defaultContactCountry;
-
$form->applyFilter('__ALL__', 'trim');
$js = array();
$addressOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'address_options', TRUE, NULL, TRUE
);
- $attributes = CRM_Core_DAO::getAttribute('CRM_Core_DAO_Address');
$elements = array(
'address_name',
);
foreach ($elements as $name) {
- //Remove id from name, to allow comparison against enabled addressOtions.
+ //Remove id from name, to allow comparison against enabled addressOptions.
$nameWithoutID = strpos($name, '_id') !== FALSE ? substr($name, 0, -3) : $name;
// Skip fields which are not enabled in the address options.
if (empty($addressOptions[$nameWithoutID])) {
// more handling done in formRule func
CRM_Contact_Form_Edit_Address::storeRequiredCustomDataInfo($form, $groupTree);
- $template = CRM_Core_Smarty::singleton();
- $tplGroupTree = $template->get_template_vars('address_groupTree');
+ $tplGroupTree = CRM_Core_Smarty::singleton()->get_template_vars('address_groupTree');
$tplGroupTree = empty($tplGroupTree) ? array() : $tplGroupTree;
$form->assign('address_groupTree', $tplGroupTree + array($blockId => $groupTree));