Bug 34478: Add 'op' to cataloguing/merge

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-08 11:44:57 +01:00
parent 6c8fc9ffc9
commit 07723d6708
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
2 changed files with 7 additions and 8 deletions

View File

@ -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;

View File

@ -105,8 +105,7 @@ div#result { margin-top: 1em; }
[% IF ( choosereference ) %]
<p>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.</p>
<form id="mergeform" action="/cgi-bin/koha/cataloguing/merge.pl" method="post">
[% INCLUDE 'csrf-token.inc' %]
<form id="mergeform_ref" action="/cgi-bin/koha/cataloguing/merge.pl" method="get">
<fieldset class="rows">
<legend>Merge reference</legend>
<ol>
@ -186,6 +185,7 @@ div#result { margin-top: 1em; }
<input type="hidden" name="frameworkcode" value="[% framework | html %]" />
<fieldset class="action">
<input type="hidden" name="op" value="cud-merge" />
<input type="submit" name="merge" class="btn btn-primary" value="Merge" />
<label for="report_fields">Fields to display in report:</label>
<input type="text" name="report_fields" id="report_fields" value="[% MergeReportFields | html %]" />