From 90fdf1fa07e24fa80dac3460849f543565cfcb6a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 4 Aug 2020 13:13:43 +0000 Subject: [PATCH] Bug 26136: Prevent double submit on checkin-form To test: 1 - Browse to Circulation->Check-in 2 - Type a barcode into the Check in box 3 - Hit Enter as many as times as you can 4 - Check the statistics table: SELECT * FROM statistics WHERE itemnumber={itemnumber} AND DATE(datetime)=CURDATE(); 5 - Note you have multiple lines for the same item at the same time 6 - Apply patch 7 - Reload the page 8 - Type the barcode 9 - Press Enter even more fast and more furiously 10 - Check the statistics table 11 - Only one entry, huzzah! Signed-off-by: Sally Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart (cherry picked from commit 44f54aac602ae99d83d954a2f102d77ff93ecfa7) (cherry picked from commit 9d85636bf0db1350fb4f7e83e6cca2fcc0b1038b) Signed-off-by: Aleisha Amohia --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 1 + 1 file changed, 1 insertion(+) 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 81d0e156bd..0e15a4fa0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -917,6 +917,7 @@ $("#barcode").focus(); } $(document).ready(function () { + $("#checkin-form").preventDoubleFormSubmit(); $(".modal.block").modal({ backdrop: 'static'}).on('shown.bs.modal', function() { $("#barcode").prop("disabled", true); $(".show_checkin_dialog").show(); -- 2.39.5