From 188803c4eabfe08ea3fd476797a7a7d0fa374543 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 2 Feb 2024 08:39:15 +0000 Subject: [PATCH] Bug 34478: Changes for opac-addbybiblionumber Signed-off-by: Jonathan Druart --- .../opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt | 5 +++-- opac/opac-addbybiblionumber.pl | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt index fe6b54c9d7..7786a1097f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt @@ -48,7 +48,7 @@ [% FOREACH biblio IN biblios %] [% END %] - +
@@ -64,7 +64,7 @@ [% END %] -
+
Cancel @@ -93,6 +93,7 @@ [% END %]
+ Cancel diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl index fc31627882..1916c26e9e 100755 --- a/opac/opac-addbybiblionumber.pl +++ b/opac/opac-addbybiblionumber.pl @@ -28,6 +28,7 @@ use Koha::Biblios; use Koha::Virtualshelves; my $query = CGI->new; +my $op = $query->param('op') // q{}; my @biblionumbers = $query->multi_param('biblionumber'); my $selectedshelf = $query->param('selectedshelf'); my $newshelf = $query->param('newshelf'); @@ -54,7 +55,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -if ($newvirtualshelf) { +if( $op && $op !~ /^cud-/ ) { + $authorized = 0; +} elsif ($newvirtualshelf) { if ($loggedinuser > 0 and ( !$public or $public and $loggedinuser > 0 && C4::Context->preference('OpacAllowPublicListCreation') ) -- 2.39.5