diff --git a/js/gratipay/payments.js b/js/gratipay/payments.js index 070b36bace..91535617f2 100644 --- a/js/gratipay/payments.js +++ b/js/gratipay/payments.js @@ -15,7 +15,7 @@ Gratipay.payments = {}; Gratipay.payments.init = function(participantId) { Gratipay.participantId = participantId; - $('#delete form').submit(Gratipay.payments.submitDeleteForm); + $('#delete').submit(Gratipay.payments.submitDeleteForm); // Lazily depend on Balanced. var balanced_js = "https://js.balancedpayments.com/1.1/balanced.min.js"; @@ -25,22 +25,18 @@ Gratipay.payments.init = function(participantId) { } Gratipay.payments.submitDeleteForm = function(e) { - var item = $("#payout").length ? "bank account" : "credit card"; - var slug = $("#payout").length ? "bank-account" : "credit-card"; - var msg = "Really disconnect your " + item + "?"; - if (!confirm(msg)) { - e.stopPropagation(); - e.preventDefault(); + e.stopPropagation(); + e.preventDefault(); + + var $form = $(this); + if (!confirm($form.data('confirm'))) { return false; } - jQuery.ajax( - { url: '/' + slug + '.json' + { url: $form.attr('action') , data: {action: "delete"} , type: "POST" - , success: function() { - window.location.href = '/' + slug + '.html'; - } + , success: function() { window.location.reload(); } , error: Gratipay.error } ); diff --git a/www/bank-account.html.spt b/www/bank-account.html.spt index 58496fc348..5edb257493 100644 --- a/www/bank-account.html.spt +++ b/www/bank-account.html.spt @@ -108,12 +108,10 @@ title = _("Bank Account") {% endif %} {% if bank_account and bank_account.is_setup %} -
-
- - -
-
+
+ +
{% endif %}

Bank account information is stored and processed by -

-
- - -
-
+
+ +

Credit card information is stored and processed by Balanced Payments.