Commit ac44bb1c authored by Web Access's avatar Web Access

Fix for CRM-15850

parent 1f2a548b
......@@ -498,6 +498,7 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address {
$address->find();
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
$count = 1;
while ($address->fetch()) {
// deprecate reference.
......@@ -518,6 +519,9 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address {
CRM_Core_DAO::storeValues($address, $values);
// add state and country information: CRM-369
if (!empty($address->location_type_id)) {
$values['location_type'] = CRM_Utils_Array::value($address->location_type_id, $locationTypes);
}
if (!empty($address->state_province_id)) {
$address->state = CRM_Core_PseudoConstant::stateProvinceAbbreviation($address->state_province_id, FALSE);
$address->state_name = CRM_Core_PseudoConstant::stateProvince($address->state_province_id, FALSE);
......
......@@ -36,7 +36,7 @@
{assign var="sa_name" value="selected_shared_address-`$blockId`"}
{assign var="sa_id" value="`$sa_name`-`$sa.id`"}
<input type="radio" name="{$sa_name}" id="{$sa_id}" value="{$sa.id}" {if $sa.id eq $sharedAddresses.$blockId.shared_address_display.master_id}checked="checked"{/if}>
<label for="{$sa_id}">{$sa.display_text}</label><br/>
<label for="{$sa_id}">{$sa.display_text}</label>{if $sa.location_type}({$sa.location_type}){/if}<br/>
{/foreach}
{/if}
</div>
......@@ -99,7 +99,7 @@
}
var name = 'selected_shared_address-'+ blockNo,
id = name + '-' + val.id;
addressHTML += '<input type="radio" name="' + name + '" id="' + id + '" value="' + val.id + '"' + selected +'><label for="' + id + '">' + val.display_text + '</label><br/>';
addressHTML += '<input type="radio" name="' + name + '" id="' + id + '" value="' + val.id + '"' + selected +'><label for="' + id + '">' + val.display_text + '</label>('+val.location_type+')<br/>';
});
if (!addressHTML) {
......
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