LP1749992: Fix Duplicate Bill Payments on Double Click user/dyrcona/lp1749992-fix-apply-payment-dubl-click
authorJason Stephenson <jason@sigio.com>
Fri, 16 Feb 2018 23:49:14 +0000 (18:49 -0500)
committerJason Stephenson <jason@sigio.com>
Fri, 16 Feb 2018 23:49:14 +0000 (18:49 -0500)
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 <jason@sigio.com>
Open-ILS/src/templates/staff/circ/patron/t_bills.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js

index c3fda5c..6879520 100644 (file)
@@ -88,6 +88,7 @@
                 type="submit"
                 class="btn btn-default"
                 ng-disabled="invalid_check_number() || !gridControls.selectedItems().length"
+               ng-dblclick="dblClickNoOp()"
             >[% l('Apply Payment') %]</button>
           </div>
         </div>
index ea21a3c..fc01c29 100644 (file)
@@ -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',