2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 {include file="CRM/common/dedupe.tpl"}
27 <div class="crm-accordion-header">
28 {ts}Filter Contacts{/ts}
30 <div class="crm-accordion-body">
32 <table class="no-border form-layout-compressed" id="searchOptions" style="width:100%;">
34 <td class="crm-contact-form-block-contact1">
35 <label for="search-contact1">{ts}Contact Name{/ts}</label><br />
36 <input class="crm-form-text" type="text" size="50" placeholder="Search Contacts" value="{$searchcontact1}" id="search-contact1" search-column="0" />
38 <td class="crm-contact-form-block-search">
39 <label> </label><br />
40 <button type="submit" class="button crm-button filtercontacts"><span><i class="crm-i fa-search"></i> Find Contacts</span></button>
48 <div class="crm-content-block crm-block">
49 {include file="CRM/common/pager.tpl" location="top"}
50 {include file='CRM/common/jsortable.tpl'}
52 <div id="claim_level-wrapper" class="dataTables_wrapper">
53 <table id="claim_level-table" class="display">
56 <th>{ts}Contact 1{/ts}</th>
57 <th>{ts}Contact 2 (Duplicate){/ts}</th>
58 <th data-orderable="false"></th>
62 {assign var="rowClass" value="odd-row"}
63 {assign var="rowCount" value=0}
65 {foreach from=$exceptions key=errorId item=exception}
66 {assign var="rowCount" value=$rowCount+1}
68 <tr id="row{$rowCount}" class="{cycle values="odd,even"}">
71 {assign var="contact1name" value="contact_id1.display_name"}
72 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$exception.contact_id1`"}" target="_blank">{ $exception.$contact1name }</a>
75 {assign var="contact2name" value="contact_id2.display_name"}
76 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$exception.contact_id2`"}" target="_blank">{ $exception.$contact2name }</a>
79 <a id='duplicateContacts' href="#" title={ts}Remove Exception{/ts} onClick="processDupes( {$exception.contact_id1}, {$exception.contact_id2}, 'nondupe-dupe', 'dedupe-exception' );return false;">» {ts}Remove Exception{/ts}</a>
83 {if $rowClass eq "odd-row"}
84 {assign var="rowClass" value="even-row"}
86 {assign var="rowClass" value="odd-row"}
93 {include file="CRM/common/pager.tpl" location="bottom"}
98 <div class="clear"><br /></div>
99 <div class="action-link">
100 {crmButton p="civicrm/contact/deduperules" q="reset=1" icon="times"}{ts}Done{/ts}{/crmButton}
103 {* process the dupe contacts *}
105 <script type="text/javascript">
109 var $form = $({if empty($form.formClass)}'#crm-main-content-wrapper'{else}'form.{$form.formClass}'{/if});
110 var currentLocation = {$pager->_response.currentLocation|json_encode};
113 var refreshing = false;
117 $('.filtercontacts').on( 'click', function (e) {
120 timer = setTimeout(updateTable, 500)
123 function updateTable() {
125 var contact1term = $('#search-contact1').val();
127 currentLocation = currentLocation.replace(/crmPID=\d+/, 'crmPID=' + 0);
129 if (currentLocation.indexOf('crmContact1Q') !== -1) {
130 currentLocation = currentLocation.replace(/crmContact1Q=\w*/, 'crmContact1Q=' + contact1term);
133 currentLocation += '&crmContact1Q='+contact1term;
136 refresh(currentLocation);
139 function refresh(url) {
142 var options = url ? {url: url} : {};
143 $form.off('.crm-pager').closest('.crm-ajax-container, #crm-main-content-wrapper').crmSnippet(options).crmSnippet('refresh');