Bug 34478: Manual fix - Batch add items (course reserves)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Tomás Cohen Arazi 2024-01-29 17:05:47 -03:00 committed by Jonathan Druart
parent 477a554151
commit c79a31b7a3
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 6 additions and 6 deletions

View file

@ -32,9 +32,9 @@ use Koha::Items;
my $cgi = CGI->new;
my $action = $cgi->param('action') || q{};
my $course_id = $cgi->param('course_id') || q{};
my $barcodes = $cgi->param('barcodes') || q{};
my $op = $cgi->param('op') || q{};
my $course_id = $cgi->param('course_id') || q{};
my $barcodes = $cgi->param('barcodes') || q{};
my $biblionumbers = $cgi->param('biblionumbers') || q{};
my $itype = $cgi->param('itype');
@ -63,10 +63,10 @@ my $course = GetCourse($course_id);
if ( $course_id && $course ) {
$template->param( course => $course );
if ( !$action ) {
if ( !$op ) {
$template->param( action => 'display_form' );
}
elsif ( $action eq 'cud-add' ) {
elsif ( $op eq 'cud-add' ) {
my @barcodes = uniq( split( /\s\n/, $barcodes ) );
my @biblionumbers = uniq( split( /\s\n/, $biblionumbers ) );

View file

@ -47,7 +47,7 @@
<form method="post" action="/cgi-bin/koha/course_reserves/batch_add_items.pl">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="course_id" value="[% course.course_id | html %]" />
<input type="hidden" name="action" value="add" />
<input type="hidden" name="op" value="cud-add" />
<fieldset class="rows">
<legend>Add items: scan barcodes</legend>