) {
// Set this value as the default against the 'other' contact value
$rows["move_location_{$blockName}_{$count}"]['main'] = $mainValueCheck[$blockInfo['displayField']];
+ $rows["move_location_{$blockName}_{$count}"]['main_is_primary'] = $mainValueCheck['is_primary'];
$mainContactBlockId = $mainValueCheck['id'];
break;
}
// Provide a select drop-down for the location's location type
// eg: Home, Work...
- $js = NULL;
-
if ($blockInfo['hasLocation']) {
// Load the location options for this entity
$locationOptions = civicrm_api3($blockName, 'getoptions', array('field' => 'location_type_id'));
- // JS lookup 'main' contact's location (if there are any)
- if (!empty($locations['main'][$blockName])) {
- $js = array('onChange' => "mergeBlock('$blockName', this, $count, 'locTypeId' );");
- }
-
$thisLocId = $value['location_type_id'];
// Put this field's location type at the top of the list
"location_blocks[$blockName][$count][locTypeId]",
NULL,
$defaultLocId + $tmpIdList,
- $js,
);
// Add the relevant information to the $migrationInfo
// Provide a select drop-down for the location's type/provider
// eg websites: Google+, Facebook...
- $js = NULL;
-
if ($blockInfo['hasType']) {
// Load the type options for this entity
$typeOptions = civicrm_api3($blockName, 'getoptions', array('field' => $blockInfo['hasType']));
- // CRM-17556 Set up JS lookup of 'main' contact's value by type
- if (!empty($locations['main'][$blockName])) {
- $js = array('onChange' => "mergeBlock('$blockName', this, $count, 'typeTypeId' );");
- }
-
$thisTypeId = CRM_Utils_Array::value($blockInfo['hasType'], $value);
// Put this field's location type at the top of the list
"location_blocks[$blockName][$count][typeTypeId]",
NULL,
$defaultTypeId + $tmpIdList,
- $js,
);
// Add the information to the migrationInfo