From b88930e84e496fb301fec3c8612ffc6c2a9fb44c Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Thu, 13 Apr 2023 09:27:31 +0000 Subject: [PATCH] Bug 32418: (follow-up) Remove jQuery, Fix typos in url, add biblio as template param To test: 1. Go to any record 2. Hit the edit button on an item in the holdings table 3. Modify the URL so that the query param for the itemnumber is either 3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber= 3.2 an itemnumber that doesn't exist: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999 3.3 whatever else you come up with.. 4. Check the same thing for the dupe option (op=dupeitem) 5. Sign off Signed-off-by: David Nind --- cataloguing/additem.pl | 2 +- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index e1f4650e09..44cd0bc19c 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -160,7 +160,7 @@ if ( $op eq 'edititem' || $op eq 'dupeitem' ) { my $item = Koha::Items->find($itemnumber); if ( !$item ) { $itemnumber = undef; - $template->param( item_doesnt_exist => 1 ); + $template->param( biblio => $biblio, item_doesnt_exist => 1 ); output_and_exit( $input, $cookie, $template, 'unknown_item' ); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 0844f68e5b..57f53b4c52 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -27,13 +27,6 @@ [% Asset.js("js/cataloging_additem.js") | $raw %] @@ -68,7 +61,7 @@
[% IF item_doesnt_exist %] [% END %] [% INCLUDE 'blocking_errors.inc' %] -- 2.30.2