From b0e107af3bc1c68a0f6bce157fa437877befb090 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 --- 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 1293dafe17..eb027621ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -908,6 +908,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.11.0