From 3e7176331f38abaf518bed5d1fd7200c67c904ea Mon Sep 17 00:00:00 2001 From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Date: Wed, 18 Dec 2019 10:37:00 +0100 Subject: [PATCH] Bug 24257: Fix close of modal on 'Yes, print slip' When a item-transfer-modal is prompted by returns.tt and the option "Yes, print slip" is selected the transfer is not initiated and the modal does not disappear. The print_slip hidden input must be in the same form as the submit/button .print, otherwise the browser logs this.form.print_slip is undefined Test plan: 1. set AutomaticItemReturn to "don't" 2. Check out an item and attempt to check it in at a branch it doesn't belong to. 3. When the popup modal appears select 'Yes, print slip'. => Observe that the transfer does initiate and the modal closes Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 05c2eae869..29818882c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -497,6 +497,9 @@ <div class="modal-dialog"> <div class="modal-content"> <form method="post" action="returns.pl" name="mainform" id="mainform"> + + <input type="hidden" name="print_slip" value="0" /> + <div class="modal-header"> <h3> Please return this item to [% Branches.GetName( returnbranch ) | html %] @@ -551,6 +554,9 @@ <div class="modal-dialog"> <div class="modal-content"> <form method="post" action="returns.pl" class="confirm"> + + <input type="hidden" name="print_slip" value="0" /> + <div class="modal-header"> <h3> Hold found: @@ -609,9 +615,6 @@ <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4> [% END %] - <input type="hidden" name="print_slip" value="0" /> - - [% FOREACH inputloo IN inputloop %] <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" /> <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" /> -- 2.11.0