From 11d371a62009afb85c007e717fb5114dfbe6cc82 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 12 Dec 2023 16:26:51 +0100 Subject: [PATCH] Bug 34478: Manual fix - additem Signed-off-by: Jonathan Druart --- cataloguing/additem.pl | 18 +++++++++--------- .../prog/en/modules/cataloguing/additem.tt | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index b84d70cc50..ea384f59f2 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -187,7 +187,7 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'cataloguing', record => $record } ); my $current_item; -my $nextop="additem"; +my $nextop="cud-additem"; my @errors; # store errors found while checking data BEFORE saving item. # Getting last created item cookie @@ -232,7 +232,7 @@ $template->param( ); #------------------------------------------------------------------------------- -if ($op eq "additem") { +if ($op eq "cud-additem") { my $add_submit = $input->param('add_submit'); my $add_duplicate_submit = $input->param('add_duplicate_submit'); @@ -355,7 +355,7 @@ if ($op eq "additem") { } } - $nextop = "additem"; + $nextop = "cud-additem"; } @@ -500,7 +500,7 @@ if ($op eq "additem") { $current_item->{barcode} = undef; # Don't save it! } - $nextop = "additem"; + $nextop = "cud-additem"; #------------------------------------------------------------------------------- } elsif ($op eq "delitem") { #------------------------------------------------------------------------------- @@ -518,7 +518,7 @@ if ($op eq "additem") { } else { push @errors, @{ $deleted->messages }[0]->message; - $nextop = "additem"; + $nextop = "cud-additem"; } #------------------------------------------------------------------------------- } elsif ($op eq "delallitems") { @@ -531,7 +531,7 @@ if ($op eq "additem") { my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); $indexer->index_records( $biblionumber, "specialUpdate", "biblioserver" ); if ( @errors ) { - $nextop="additem"; + $nextop="cud-additem"; } else { my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); my $views = { C4::Search::enabled_staff_search_views }; @@ -616,7 +616,7 @@ if ($op eq "additem") { $item->store; } - $nextop="additem"; + $nextop="cud-additem"; } elsif ($op eq "delinkitem"){ my $analyticfield = '773'; @@ -690,7 +690,7 @@ my @header_value_loop = map { # Using last created item if it exists if ( - $op ne "additem" + $op ne "cud-additem" && $op ne "edititem" && $op ne "dupeitem" ) { @@ -715,7 +715,7 @@ my $branchcode = $input->param('branch') || C4::Context->userenv->{branch}; # OR # If the subfield must be prefilled with last catalogued item my @subfields_to_prefill; -if ( $nextop eq 'additem' && $op ne 'dupeitem' && $prefillitem ) { +if ( $nextop eq 'cud-additem' && $op ne 'dupeitem' && $prefillitem ) { @subfields_to_prefill = split(' ', C4::Context->preference('SubfieldsToUseWhenPrefill')); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 0a402dc323..1cf3bcb028 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -177,7 +177,7 @@
[% INCLUDE 'csrf-token.inc' %] - + [% IF (popup) %] [% END %] -- 2.39.2