From b42682021989dd67cfa5a4bfeb8ad7684bfbf2d1 Mon Sep 17 00:00:00 2001
From: Jason Etheridge <jason@esilibrary.com>
Date: Wed, 15 Jun 2011 03:13:50 -0400
Subject: [PATCH] lp797321: Disable the Apply Payment button during payment
 processing to mitigate chance of duplicate payments.

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
a complete solution, but better than before

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
---
 Open-ILS/xul/staff_client/server/patron/bill2.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js
index 12109b1bd8..50bc0041ea 100644
--- a/Open-ILS/xul/staff_client/server/patron/bill2.js
+++ b/Open-ILS/xul/staff_client/server/patron/bill2.js
@@ -178,7 +178,9 @@ function event_listeners() {
             'command',
             function(ev) {
                 try {
+                    $('apply_payment_btn').disabled = true;
                     apply_payment();
+                    $('apply_payment_btn').disabled = false;
                 } catch(E) {
                     alert('Error in bill2.js, apply_payment_btn: ' + E);
                 }
-- 
2.11.0