LP#1749992 Disable payment button during payment collab/dbwells/lp1749992_prevent_payment_double_submit
authorDan Wells <dbw2@calvin.edu>
Tue, 20 Feb 2018 16:05:49 +0000 (11:05 -0500)
committerDan Wells <dbw2@calvin.edu>
Tue, 20 Feb 2018 16:09:55 +0000 (11:09 -0500)
commitd6f74f47ca4d2194d14be8e320e31485f69fd20b
tree36f71cb74d2e077758fb440001de9e3d8bd6a2b7
parent32b0358678f4eb45a1c40f7f39ca7c9a9871326a
LP#1749992 Disable payment button during payment

Since the display is not refreshed until the payment finishes, it
is possible to fire off a second payment by double-clicking.

This commit is a simple way to disable the button while a payment is
in process, then enable it again after the display refreshes.

Since the 'sendPayment()' function is wrapped, we may need to move
this logic up, but this being a single promise is simpler, and it
solved the problem in testing.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/staff/circ/patron/t_bills.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js