{* +--------------------------------------------------------------------+ | Copyright CiviCRM LLC. All rights reserved. | | | | This work is published under the GNU AGPLv3 license with some | | permitted exceptions and without any warranty. For full license | | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *}
{ts}Click Merge to move data from the Duplicate Contact on the left into the Main Contact. In addition to the contact data (address, phone, email...), you may choose to move all or some of the related activity records (groups, contributions, memberships, etc.).{/ts} {help id="intro"}
{ts}WARNING: The duplicate contact record WILL BE DELETED after the merge is complete.{/ts}
{if $user}
{ts 1=$config->userFramework}WARNING: There are %1 user accounts associated with both the original and duplicate contacts. Ensure that the %1 user you want to retain is on the right - if necessary use the 'Flip between original and duplicate contacts.' option at top to swap the positions of the two records before doing the merge. The user record associated with the duplicate contact will not be deleted, but will be unlinked from the associated contact record (which will be deleted). You will need to manually delete that user (click on the link to open the %1 user account in new screen). You may need to give thought to how you handle any content or contents associated with that user.{/ts}
{/if}
{include file="CRM/common/formButtons.tpl" location="top"}
{foreach from=$summary_rows item=summaryRow} {/foreach} {foreach from=$rows item=row key=field} {if !isset($row.main) && !isset($row.other)} {else} {if $row.main eq $row.other} {else} {/if} {/if} {assign var=position value=$field|strrpos:'_'} {assign var=blockId value=$field|substr:$position+1} {assign var=blockName value=$field|substr:14:$position-14} {* For location blocks *} {if $row.location_entity} {* For non-location blocks *} {else} {/if} {/foreach} {foreach from=$rel_tables item=params key=paramName} {if $paramName eq 'move_rel_table_users'} {/if} {else} {/if} {/foreach}
  {$otherContactTypeIcon} {$other_name|escape} ({ts}duplicate{/ts}) {ts}Mark All{/ts}
=={$form.toggleSelect.html} ==>
{$mainContactTypeIcon}{$main_name|escape} Add/overwrite?
{$summaryRow.label} {$summaryRow.other_contact_value} {$summaryRow.main_contact_value}
{$row.title|escape}
{$row.title|escape} {* @TODO check if this is ever an array or a fileName? *} {if $row.location_entity == "email" OR $row.location_entity == "address"} {else} {/if} {if !is_array($row.other)} {$row.other|escape} {elseif $row.other.fileName} {$row.other.fileName|escape} {else} {', '|implode:$row.other} {/if} {if $form.$field}=={$form.$field.html|crmAddClass:"select-row"}==>{/if} {strip} {if $row.location_entity == "email" OR $row.location_entity == "address"} {else} {/if} {* @TODO check if this is ever an array or a fileName? *} {if !is_array($row.main)} {$row.main|escape} {elseif $row.main.fileName} {$row.main.fileName|escape} {else} {', '|implode:$row.main} {/if} {/strip} {* Display location for fields with locations *} {if $blockName eq 'email' || $blockName eq 'phone' || $blockName eq 'address' || $blockName eq 'im' } {$form.location_blocks.$blockName.$blockId.locTypeId.html}  {/if} {* Display other_type_id for websites, ims and phones *} {if $blockName eq 'website' || $blockName eq 'im' || $blockName eq 'phone' } {$form.location_blocks.$blockName.$blockId.typeTypeId.html}  {/if} {* Display the overwrite/add/add new label *} {if $row.main && $row.main_is_primary == "1"}Primary{/if} {if $row.main}({ts}overwrite{/ts}){else}({ts}add{/ts}){/if} {if $row.main && ($blockName eq 'email' || $blockName eq 'phone')} {$form.location_blocks.$blockName.$blockId.operation.html} {/if} {if $blockName neq 'website' && (($row.main && $row.main_is_primary != "1") || !$row.main)} {$form.location_blocks.$blockName.$blockId.set_other_primary.html} {/if} {if !is_array($row.main)} {$row.main|escape} {elseif $row.main.fileName} {$row.main.fileName|escape} {else} {', '|implode:$row.main} {/if} {if isset($row.main) || isset($row.other)} {if $row.main == $row.other} ({ts}match{/ts})
{elseif $row.main} ({ts}overwrite{/ts})
{else} ({ts}add{/ts}) {/if}
{/if}
{ts}Move related...{/ts}{if $otherUfId}{$otherUfName}=={$form.$paramName.html|crmAddClass:"select-row"}==>{else}{if $mainUfId}{$mainUfName}{/if} ({ts}migrate{/ts})
{ts}Move related...{/ts}{$params.title}=={$form.$paramName.html|crmAddClass:"select-row"}==>{$params.title}{if $form.operation.$paramName.add.html} {$form.operation.$paramName.add.html}{/if} ({ts}migrate{/ts})
{include file="CRM/common/formButtons.tpl" location="bottom"}
{literal} {/literal} {* process the dupe contacts *} {include file="CRM/common/dedupe.tpl"}