diff options
| author | IEL <iel@odoo.com> | 2020-11-06 16:43:43 +0000 |
|---|---|---|
| committer | Ivan Yelizariev <iel@odoo.com> | 2020-11-13 14:11:51 +0000 |
| commit | 7062aed4e9920c8a7dc122bad1baeeda00c1d89f (patch) | |
| tree | f5505ffcb3728800e0af88026f756109b647bcfb /addons/payment/static/src/js/payment_form.js | |
| parent | dbf966f6f012ccf5aa9b501586e2aa0fde05be5d (diff) | |
[FIX] payment: prevent changing checkout options
STEPS:
* install website_sale
* setup few delivery options
* setup online payment (e.g. paypal)
* at website add products to cart and proceed to checkout page
* slow down internet speed
* click "Pay now"
BEFORE: while it's loading, you can change delivery option. So, you have SO
changed, while in payment page you see old total amount
AFTER: it's not possible to change delivery options through UI
Note that it is not possible to pay less that what you should at anyway.
opw-2324543
closes odoo/odoo#61721
X-original-commit: eb3ed89f8440050fc32f9a7b29fb2b6ab8fd6b59
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Diffstat (limited to 'addons/payment/static/src/js/payment_form.js')
| -rw-r--r-- | addons/payment/static/src/js/payment_form.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index 2138082f1de..e8d6d784cea 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -130,12 +130,14 @@ publicWidget.registry.PaymentForm = publicWidget.Widget.extend({ }, disableButton: function (button) { + $("body").block({overlayCSS: {backgroundColor: "#000", opacity: 0, zIndex: 1050}, message: false}); $(button).attr('disabled', true); $(button).children('.fa-lock').removeClass('fa-lock'); $(button).prepend('<span class="o_loader"><i class="fa fa-refresh fa-spin"></i> </span>'); }, enableButton: function (button) { + $('body').unblock(); $(button).attr('disabled', false); $(button).children('.fa').addClass('fa-lock'); $(button).find('span.o_loader').remove(); |
