From 9f57b8dcc5e1d50298a645880c7e459f8e38ae6a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 31 Mar 2021 13:06:49 +0100 Subject: [PATCH] Bug 28064: Add dotransfer field to slip print submission By changing the code to only do a javascript triggered submission from the from button we lose the original buttons name and value elements upon submission. This patch checks for those fields in the JS capture and triggers the addition of a new hidden form field to contain the dotransfer data. Test plan 1/ Set AutomaticItemReturn system preference is set to "Don't" 2/ Check in an item that belongs to another library, a dialog will ask you if you want to transfer. 3/ Click 'Yes, print slip' 4/ Look at the item record and note the status is 'Available'. 5/ Apply patch 6/ Follow steps 2 - 4 7/ Note the status is now 'In transit to...' 8/ Signoff Signed-off-by: Sally Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart (cherry picked from commit ccd72425327d50ec7595f48021f9e53a30c0b90d) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 1dc1a28b2d..210dfcf05b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1094,6 +1094,10 @@ this.form.print_slip.value = 1; let barcode = document.getElementById('confirm-hold-barcode'); if ( barcode ) barcode.remove(); + if ($(this).attr('name') == "dotransfer") { + var dotransfer = $("").attr("type", "hidden").attr("name", "dotransfer").val("Yes"); + $('#mainform').append(dotransfer); + } this.form.submit(); }); -- 2.20.1