Bug 34478: Changes for virtualshelves/addbybiblionumber

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2024-02-02 10:52:42 +00:00 committed by Jonathan Druart
parent 700ff3508b
commit e9a4bf0106
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
2 changed files with 5 additions and 1 deletions

View File

@ -116,6 +116,7 @@
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid">
<fieldset class="action">
<input type="hidden" name="op" value="cud-add" />
<input type="submit" class="btn btn-primary" value="Save" />
<button class="btn btn-default close_window">Cancel</button>
</fieldset>

View File

@ -66,6 +66,7 @@ use Koha::Biblios;
use Koha::Virtualshelves;
my $query = CGI->new;
my $op = $query->param('op') // q{};
my $shelfnumber = $query->param('shelfnumber');
my $newvirtualshelf = $query->param('newvirtualshelf');
my $newshelf = $query->param('newshelf');
@ -90,7 +91,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
if ($newvirtualshelf) {
if ( $op && $op !~ /^cud-/ ) {
$authorized = 0;
} elsif ($newvirtualshelf) {
my $shelf = eval {
Koha::Virtualshelf->new(
{