From 07723d6708e607eb204756e182796cfe644e656a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 8 Feb 2024 11:44:57 +0100 Subject: [PATCH] Bug 34478: Add 'op' to cataloguing/merge Signed-off-by: Jonathan Druart --- cataloguing/merge.pl | 11 +++++------ .../prog/en/modules/cataloguing/merge.tt | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index 7fe218845e..30a5d96b21 100755 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -42,11 +42,6 @@ use Koha::Items; use Koha::MetadataRecord; my $input = CGI->new; -my @biblionumbers = $input->multi_param('biblionumber'); -my $merge = $input->param('merge'); - -my @errors; - my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "cataloguing/merge.tt", @@ -56,10 +51,14 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +my @biblionumbers = $input->multi_param('biblionumber'); +my $op = $input->param('op') || q{}; + +my @errors; #------------------------ # Merging #------------------------ -if ($merge) { +if ($op eq 'cud-merge') { my $dbh = C4::Context->dbh; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt index c5c252bbe8..5d5ad66d83 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt @@ -105,8 +105,7 @@ div#result { margin-top: 1em; } [% IF ( choosereference ) %]

Please choose which record will be the reference for the merge. The record chosen as reference will be kept, and the other will be deleted.

-
- [% INCLUDE 'csrf-token.inc' %] +
Merge reference
    @@ -186,6 +185,7 @@ div#result { margin-top: 1em; }
    + -- 2.39.5