diff options
| author | fda-odoo <fda@odoo.com> | 2018-01-09 16:05:29 +0100 |
|---|---|---|
| committer | fda-odoo <fda@odoo.com> | 2018-01-24 15:38:02 +0100 |
| commit | 2a59f2804ff46524a0437f6b3e1a3cc7d223f5ac (patch) | |
| tree | f503a780980b1082ec3cf23b0388bfb12e1868e2 | |
| parent | c0e919b8ebeef0ae4f2f2477c93d277cbb03ee7a (diff) | |
[FIX] payment: display a better button for "add new card"
it removes the + while the rotating spin is showing and display the + icon after the loading
| -rw-r--r-- | addons/payment/static/src/js/payment_form.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index bf555254d5e..44ed16d74ac 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -84,6 +84,7 @@ odoo.define('payment.payment_form', function (require) { } $(button).attr('disabled', true); + $(button).children('.fa-plus-circle').removeClass('fa-plus-circle') $(button).prepend('<span class="o_loader"><i class="fa fa-refresh fa-spin"></i> </span>'); var verify_validity = this.$el.find('input[name="verify_validity"]'); @@ -120,10 +121,12 @@ odoo.define('payment.payment_form', function (require) { } // here we remove the 'processing' icon from the 'add a new payment' button $(button).attr('disabled', false); + $(button).children('.fa').addClass('fa-plus-circle') $(button).find('span.o_loader').remove(); }).fail(function (message, data) { // if the rpc fails, pretty obvious $(button).attr('disabled', false); + $(button).children('.fa').addClass('fa-plus-circle') $(button).find('span.o_loader').remove(); self.displayError( @@ -244,6 +247,7 @@ odoo.define('payment.payment_form', function (require) { } // We add a 'processing' icon into the 'add a new payment' button $(button).attr('disabled', true); + $(button).children('.fa-plus-circle').removeClass('fa-plus-circle') $(button).prepend('<span class="o_loader"><i class="fa fa-refresh fa-spin"></i> </span>'); // we force the check when adding a card trough here @@ -283,10 +287,12 @@ odoo.define('payment.payment_form', function (require) { } // here we remove the 'processing' icon from the 'add a new payment' button $(button).attr('disabled', false); + $(button).children('.fa').addClass('fa-plus-circle') $(button).find('span.o_loader').remove(); }).fail(function (message, data) { // if the rpc fails, pretty obvious $(button).attr('disabled', false); + $(button).children('.fa').addClass('fa-plus-circle') $(button).find('span.o_loader').remove(); self.displayError( |
