From be3d72a1810e6c7b6678d41c674dc36d4cff584a Mon Sep 17 00:00:00 2001 From: woutse Date: Tue, 2 Mar 2021 12:59:01 +0100 Subject: [PATCH] feature/PLUG-337 --- .../web/js/view/payment/method-renderer/default.js | 11 ++++++++++- view/frontend/web/template/payment/default.html | 11 +++++------ 2 files changed, 15 insertions(+), 7 deletions(-) mode change 100644 => 100755 view/frontend/web/js/view/payment/method-renderer/default.js diff --git a/view/frontend/web/js/view/payment/method-renderer/default.js b/view/frontend/web/js/view/payment/method-renderer/default.js old mode 100644 new mode 100755 index a4896b0c..5df0f0c6 --- a/view/frontend/web/js/view/payment/method-renderer/default.js +++ b/view/frontend/web/js/view/payment/method-renderer/default.js @@ -160,10 +160,19 @@ define( if (event) { event.preventDefault(); } - $('#payment-button').html('Processing').attr('disabled','disabled'); + + var objButton = $(event.target); + if (objButton.length > 0) { + var curText = objButton.text(); + objButton.text($.mage.__('Processing')).prop('disabled', true); + } + this.isPlaceOrderActionAllowed(false); placeOrder = placeOrderAction(this.getData(), this.redirectAfterPlaceOrder); $.when(placeOrder).fail(function () { + if (objButton.length > 0) { + objButton.text(curText).prop('disabled', false); + } this.isPlaceOrderActionAllowed(true); }.bind(this)).done(this.afterPlaceOrder.bind(this)); return true; diff --git a/view/frontend/web/template/payment/default.html b/view/frontend/web/template/payment/default.html index 4d7f6704..3de27bbd 100644 --- a/view/frontend/web/template/payment/default.html +++ b/view/frontend/web/template/payment/default.html @@ -24,16 +24,16 @@
-
+
- +

- +
betalingsvoorwaarden @@ -41,8 +41,7 @@
-