From f6127447960ced00278ba11dc2be7bdee31f2293 Mon Sep 17 00:00:00 2001 From: Brad Campbell Date: Sat, 14 May 2016 20:46:29 -0400 Subject: [PATCH] fix two bugs with failed coin deposits --- chezbetty/static/js/chezbetty-terminal.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/chezbetty/static/js/chezbetty-terminal.js b/chezbetty/static/js/chezbetty-terminal.js index c0f33ee..afd8be1 100644 --- a/chezbetty/static/js/chezbetty-terminal.js +++ b/chezbetty/static/js/chezbetty-terminal.js @@ -472,7 +472,13 @@ function deposit_success (data) { if ("error" in data) { deposit_alert_error(data.error); - enable_button($(".btn-submit-deposit")); + enable_button($("#btn-confirm-deposit-yes")); + + $("#deposit-main").hide(); + $("#deposit-verify").hide(); + $("#deposit-counting").hide(); + $("#deposit-complete").hide(); + $("#deposit-coins").show(); } else { // On successful deposit, we switch to the frame that shows // the successful deposit. @@ -808,6 +814,8 @@ $("#btn-confirm-deposit-yes").click(function () { $("#btn-confirm-deposit-no").click(function () { $("#deposit-verify").hide(); $("#deposit-coins").show(); + + enable_button($("#btn-confirm-deposit-yes")); }); // Button press handler for the default deposit amount buttons