From 09a0018723a57ee2ffe7e417ab46aeac5bfab6ff Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 21 Feb 2025 13:42:13 +0000 Subject: [PATCH] Bug 39108: Prevent 'Ignore' on found hold from triggering a new modal When ignoring a waiting hold, we don't need to take any further action, we shoudlsimply close the modal This patch adds JS to prevent form submission To test: 1 - place a hold 2 - check in an item that can fill the hold 3 - in the hold found modal, click Ignore 4 - the modal dismisses and nothing changes on the hold (this is the desired behavior) 5 - check in the item again, click Confirm Hold, confirm your hold is now Waiting 6 - check in the item again, confirm the modal says "Item is already waiting" 7 - click Ignore, confirm modal reloads 8 - click Ignore, confirm modal reloads 9 - click Ignore, confirm modal reloads 10 - Apply patch 11 - check in the item again, click Confirm Hold, confirm your hold is now Waiting 12 - check in the item again, confirm the modal says "Item is already waiting" 13 - click Ignore, nothign happens! Orange you glad I didn't say banana? Signed-off-by: Amanda Campbell Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 df0be32c04b..2571d3e394c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -733,7 +733,7 @@ - +
[% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] @@ -1618,6 +1618,9 @@ if ( barcode ) barcode.remove(); this.form.submit(); }); + $(".ignore").on("click",function(e){ + e.preventDefault(); + }); $('.cancel-hold').on("click",function(e){ let cancel_form = document.getElementById('cancellation-reason'); let cancel_reason = ''; -- 2.48.1