Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
6d13d1c4
Commit
6d13d1c4
authored
5 years ago
by
bgm
Committed by
bgm
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
#932
Fix dedupe contacts flip selection
parent
5c050e1a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Contact/Page/AJAX.php
+4
-1
4 additions, 1 deletion
CRM/Contact/Page/AJAX.php
templates/CRM/Contact/Page/DedupeFind.tpl
+4
-2
4 additions, 2 deletions
templates/CRM/Contact/Page/DedupeFind.tpl
with
8 additions
and
3 deletions
CRM/Contact/Page/AJAX.php
+
4
−
1
View file @
6d13d1c4
...
...
@@ -938,7 +938,10 @@ LIMIT {$offset}, {$rowCount}
public
static
function
flipDupePairs
(
$prevNextId
=
NULL
)
{
if
(
!
$prevNextId
)
{
// @todo figure out if this is always POST & specify that rather than inexact GET
$prevNextId
=
CRM_Utils_Request
::
retrieve
(
'pnid'
,
'Integer'
);
// We cannot use CRM_Utils_Request::retrieve() because it might be an array.
// It later gets validated in escapeAll below.
$prevNextId
=
$_REQUEST
[
'pnid'
];
}
$onlySelected
=
FALSE
;
...
...
This diff is collapsed.
Click to expand it.
templates/CRM/Contact/Page/DedupeFind.tpl
+
4
−
2
View file @
6d13d1c4
...
...
@@ -282,6 +282,7 @@
});
$
(
"
.crm-dedupe-flip-selections
"
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
var
ids
=
[];
$
(
'
.crm-row-selected
'
).
each
(
function
()
{
var
ele
=
CRM
.
$
(
'
input.crm-dedupe-select
'
,
this
);
...
...
@@ -289,7 +290,8 @@
});
if
(
ids
.
length
>
0
)
{
var
dataUrl
=
{/
literal
}
"
{
crmURL
p
=
'civicrm/ajax/flipDupePairs'
h
=
0
q
=
'snippet=4'
}
"
{
literal
}
;
CRM
.
$
.
post
(
dataUrl
,
{
pnid
:
ids
}
,
function
(
response
)
{
var
request
=
$
.
post
(
dataUrl
,
{
pnid
:
ids
}
);
request
.
done
(
function
(
dt
)
{
var
mapper
=
{
1
:
3
,
2
:
4
,
5
:
6
,
7
:
8
,
9
:
10
}
$
(
'
.crm-row-selected
'
).
each
(
function
()
{
var
idx
=
$
(
'
table#dupePairs
'
).
DataTable
().
row
(
this
).
index
();
...
...
@@ -302,7 +304,7 @@
// keep the checkbox checked if needed
$
(
'
input.crm-dedupe-select
'
,
this
).
prop
(
'
checked
'
,
$
(
this
).
hasClass
(
'
crm-row-selected
'
));
});
}
,
'
json
'
);
});
}
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment