Skip to content

Commit

Permalink
Merge pull request #13081 from colemanw/mergeBtn
Browse files Browse the repository at this point in the history
Add merge link to duplicate contact popup
  • Loading branch information
eileenmcnaughton authored Nov 14, 2018
2 parents e79f71c + 343983a commit 4302d83
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions templates/CRM/Contact/Form/Contact.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
});
Expand All @@ -408,6 +410,10 @@
<%- contact.display_name %>
</a>
<%- contact.email %>
<% if (cid) { %>
<% var params = {reset: 1, action: 'update', oid: contact.id > cid ? contact.id : cid, cid: contact.id > cid ? cid : contact.id }; %>
(<a href="<%= CRM.url('civicrm/contact/merge', params) %>">{/literal}{ts}Merge{/ts}{literal}</a>)
<% } %>
</li>
<% }); %>
</ul>
Expand Down

0 comments on commit 4302d83

Please sign in to comment.