From 63c302bc44bcdeebaa61df8c36f6d5aefa301688 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 16 Feb 2018 18:49:14 -0500 Subject: [PATCH] LP1749992: Fix Duplicate Bill Payments on Double Click If you double or multiple click the Apply Payment button in the patron bills interface in the web staff client quickly enough, more than one payment is recorded. This patch resolves that by adding a double click handler to the button that does nothing. Signed-off-by: Jason Stephenson --- Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 | 1 + Open-ILS/web/js/ui/default/staff/circ/patron/bills.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 index c3fda5c688..6879520281 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 @@ -88,6 +88,7 @@ type="submit" class="btn btn-default" ng-disabled="invalid_check_number() || !gridControls.selectedItems().length" + ng-dblclick="dblClickNoOp()" >[% l('Apply Payment') %] diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index ea21a3c194..fc01c297a4 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -75,6 +75,10 @@ function($q , egCore , egWorkLog , patronSvc) { }); } + service.dblClickNoOp = function() { + return false; + } + service.fetchBills = function(xact_id) { var bills = []; return egCore.pcrud.search('mb', -- 2.11.0