Bug 34478: Changes for opac-addbybiblionumber
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
90a1586c57
commit
188803c4ea
2 changed files with 7 additions and 3 deletions
|
@ -48,7 +48,7 @@
|
|||
[% FOREACH biblio IN biblios %]
|
||||
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
|
||||
[% END %]
|
||||
<input type="hidden" name="modifyshelfcontents" value="1" />
|
||||
<input type="hidden" name="op" value="cud-modifyshelfcontents" />
|
||||
</fieldset>
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
|
@ -64,7 +64,7 @@
|
|||
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]">
|
||||
[% END %]
|
||||
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]" />
|
||||
<input type="hidden" name="modifyshelfcontents" value="1" /></fieldset>
|
||||
<input type="hidden" name="op" value="cud-modifyshelfcontents" /></fieldset>
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<a class="close cancel" href="#">Cancel</a>
|
||||
|
@ -93,6 +93,7 @@
|
|||
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
|
||||
[% END %]
|
||||
<fieldset class="action">
|
||||
<input type="hidden" name="op" value="cud-add" />
|
||||
<input type="hidden" name="sortfield" value="title" />
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<a class="close cancel" href="#">Cancel</a>
|
||||
|
|
|
@ -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') )
|
||||
|
|
Loading…
Reference in a new issue