diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 4a55634e93..ae8ca695e0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1135,6 +1135,16 @@ } }); [% END %] + + // Handle checkout for fast cataloging + // Check the referrer to prevent csrf, fill and submit form + if(document.referrer.split('?')[0] === window.location.origin +'/cgi-bin/koha/cataloguing/additem.pl') { + let urlParams = new URLSearchParams(window.location.search); + let barcode = urlParams.get('barcode'); + $('#barcode').val(barcode); + $('#mainform').submit(); + } + }); [% INCLUDE 'str/members-menu.inc' %]