}
/**
- * Do the set default related to location type id,
- * primary location, default country
+ * Do the set default related to location type id, primary location, default country.
+ *
+ * @param array $defaults
*/
public function blockSetDefaults(&$defaults) {
$locationTypeKeys = array_filter(array_keys(CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id')), 'is_int');
$parseStatusMsg = self::parseAddressStatusMsg($parseResult);
}
+ $blocks = array('email', 'phone', 'im', 'openid', 'address', 'website');
+ foreach ($blocks as $block) {
+ if (!empty($this->_preEditValues[$block]) && is_array($this->_preEditValues[$block])) {
+ foreach ($this->_preEditValues[$block] as $count => $value) {
+ if (!empty($value['id'])) {
+ $params[$block][$count]['id'] = $value['id'];
+ $params[$block]['isIdSet'] = TRUE;
+ }
+ }
+ }
+ }
+
// Allow un-setting of location info, CRM-5969
$params['updateBlankLocInfo'] = TRUE;