Bug 18367 - Fix untranslatable string from Bug 18264
Restore display of message when no barcode found
To test:
1 - Go to course reserves
2 - Add an item to a course
3 - Try adding an invalid barcode - should get an alert
4 - Try force adding an item with itemnumber:
http://localhost:8081/cgi-bin/koha/course_reserves/add_items.pl?op=lookpup&course_id=11&itemnumber=1234523546
5 - Should recieve an error
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1fc3751804)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 456e849ec2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
parent
489794bbe9
commit
3ddac60248
|
|
@ -52,9 +52,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
flagsrequired => { coursereserves => 'add_reserves' },
|
||||
}
|
||||
);
|
||||
my $inumber = $itemnumber ? "(blank) (itemnumber:$itemnumber)" : "";
|
||||
$template->param( ERROR_BARCODE_NOT_FOUND => $barcode . $inumber )
|
||||
unless ( $barcode && !$itemnumber && $item && $action eq 'lookup' );
|
||||
|
||||
unless ( $item && $action eq 'lookup' ){
|
||||
$template->param( ERROR_ITEM_NOT_FOUND => 1 );
|
||||
$template->param( UNKNOWN_BARCODE => $barcode ) if $barcode;
|
||||
}
|
||||
|
||||
$template->param( course => GetCourse($course_id) );
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,13 @@
|
|||
|
||||
<div id="doc" class="yui-t7">
|
||||
<div id="bd">
|
||||
[% IF ERROR_BARCODE_NOT_FOUND %]
|
||||
<div class="dialog alert">No item found with barcode [% ERROR_BARCODE_NOT_FOUND %]</div>
|
||||
|
||||
[% IF ERROR_ITEM_NOT_FOUND %]
|
||||
[% IF UNKNOWN_BARCODE %]
|
||||
<div class="dialog alert">No item found with barcode [% UNKNOWN_BARCODE %]</div>
|
||||
[% ELSE %]
|
||||
<div class="dialog alert">No item found</div>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<form method="post" action="/cgi-bin/koha/course_reserves/add_items.pl">
|
||||
|
|
|
|||
Loading…
Reference in New Issue