From 343983a22a6f7c41d863c9c6a241597a96578618 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 11 Nov 2018 11:51:41 -0500 Subject: [PATCH] Add merge link to duplicate contact popup --- templates/CRM/Contact/Form/Contact.tpl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Contact/Form/Contact.tpl b/templates/CRM/Contact/Form/Contact.tpl index fc67bd80e0b0..e0e2bf2cfbe1 100644 --- a/templates/CRM/Contact/Form/Contact.tpl +++ b/templates/CRM/Contact/Form/Contact.tpl @@ -301,7 +301,8 @@ var params = { title: data.count == 1 ? {/literal}"{ts escape='js'}Similar Contact Found{/ts}" : "{ts escape='js'}Similar Contacts Found{/ts}"{literal}, info: "{/literal}{ts escape='js'}If the contact you were trying to add is listed below, click their name to view or edit their record{/ts}{literal}:", - contacts: data.values + contacts: data.values, + cid: cid }; if (data.count) { openDupeAlert(params); @@ -389,7 +390,8 @@ info: data.count ? "{/literal}{ts escape='js'}If the contact you were trying to add is listed below, click their name to view or edit their record{/ts}{literal}:" : "{/literal}{ts escape='js'}No matches found using the default Supervised deduping rule.{/ts}{literal}", - contacts: data.values + contacts: data.values, + cid: cid }; updateDupeAlert(params, data.count ? 'alert' : 'success'); }); @@ -408,6 +410,10 @@ <%- contact.display_name %> <%- contact.email %> + <% if (cid) { %> + <% var params = {reset: 1, action: 'update', oid: contact.id > cid ? contact.id : cid, cid: contact.id > cid ? cid : contact.id }; %> + ({/literal}{ts}Merge{/ts}{literal}) + <% } %> <% }); %>