lp797321: Disable the Apply Payment button during payment processing to mitigate...
authorJason Etheridge <jason@esilibrary.com>
Wed, 15 Jun 2011 07:03:23 +0000 (03:03 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 15 Jun 2011 13:29:43 +0000 (09:29 -0400)
I can't actually reproduce the creation of duplicate payments locally with
trunk/2.x, but there are reports of it, and this doesn't seem to hurt.  Not

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/xul/staff_client/server/patron/bills.js

index 2747797..4f90db3 100644 (file)
@@ -250,8 +250,10 @@ patron.bills.prototype = {
                             'cmd_bill_apply_payment' : [
                                 ['command'],
                                 function() {
-                                    try { 
+                                    try {
+                                        obj.controller.view.cmd_bill_apply_payment.setAttribute('disabled','true');
                                         obj.apply_payment(); 
+                                        obj.controller.view.cmd_bill_apply_payment.setAttribute('disabled','false');
                                     } catch(E) { 
                                         obj.error.standard_unexpected_error_alert('bills -> cmd_bill_apply_payment',E);    
                                     }