Bug 34478: Fix shelf transfer

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-06 12:07:08 +01:00
parent 444888911b
commit 0df674ba72
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
2 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,7 @@
[%~ action_block = action_block _ '</form>' ~%]
[%~ END ~%]
[%~ IF public AND allow_transfer ~%]
[%~ action_block = action_block _ ' <form action="shelves.pl" method="post">' ~%]
[%~ action_block = action_block _ ' <form action="shelves.pl" method="get">' ~%]
[%~ action_block = action_block _ '<input type="hidden" name="shelves" value="1" />' ~%]
[%~ action_block = action_block _ '<input type="hidden" name="op" value="transfer" />' ~%]
[%~ action_block = action_block _ '<input type="hidden" name="shelfnumber" value="' _ shelfnumber _ '" />' ~%]

View File

@ -242,6 +242,9 @@ if ( $op eq 'add_form' ) {
push @messages, { type => 'alert', code => 'does_not_exist' };
}
$op = $referer;
} elsif ( $op eq 'transfer' ) {
$shelfnumber = $query->param('shelfnumber');
$shelf = Koha::Virtualshelves->find($shelfnumber) if $shelfnumber;
} elsif ( $op eq 'cud-transfer' ) {
$shelfnumber = $query->param('shelfnumber');
$shelf = Koha::Virtualshelves->find($shelfnumber) if $shelfnumber;