From 9f99265f348c9e2699e7b8c9665a51860b18ae21 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 26 Jan 2024 10:52:54 -0500 Subject: [PATCH] Bug 34478: Manual fix - Rename action with op change to post - merge-patrons Signed-off-by: Jonathan Druart --- .../prog/en/modules/members/merge-patrons.tt | 9 +++++---- members/merge-patrons.pl | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt index 221296d9af..51bfd38ac7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt @@ -102,7 +102,7 @@ [% INCLUDE 'messages.inc' %]

Merge patron records

- [% IF action == 'show' %] + [% IF op == 'show' %] [% IF patrons.count > 1 %] [% IF ( patrons.count == 2 ) %]
@@ -116,7 +116,8 @@

Select patron to keep. Data from the other patrons will be transferred to this patron record and the remaining patron records will be deleted.

-
+ + [% INCLUDE 'csrf-token.inc' %] @@ -157,7 +158,7 @@ [% FOREACH p IN patrons %] [% END %] - + [% PROCESS 'members-patron-selections.inc' id="patron-merge-form" %] @@ -166,7 +167,7 @@
Error: Two or more patrons need to be selected for merging
[% END %] - [% ELSIF action == 'merge' %] + [% ELSIF op == 'cud-merge' %]

Results

[% IF error %] [% IF error == 'INVALID_KEEPER' %] diff --git a/members/merge-patrons.pl b/members/merge-patrons.pl index 8109e1c44a..5ceea2a9cb 100755 --- a/members/merge-patrons.pl +++ b/members/merge-patrons.pl @@ -37,13 +37,13 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( } ); -my $action = $cgi->param('action') || 'cud-show'; +my $op = $cgi->param('op') || 'show'; my @ids = $cgi->multi_param('id'); -if ( $action eq 'cud-show' ) { +if ( $op eq 'show' ) { my $patrons = Koha::Patrons->search({ borrowernumber => { -in => \@ids } }); $template->param( patrons => $patrons ); -} elsif ( $action eq 'merge' ) { +} elsif ( $op eq 'cud-merge' ) { my $keeper_id = $cgi->param('keeper'); my $results; @@ -65,7 +65,7 @@ if ( $action eq 'cud-show' ) { } } -$template->param( action => $action ); +$template->param( op => $op ); output_html_with_http_headers $cgi, $cookie, $template->output; -- 2.39.5