diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:50:50 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:50:50 +0200 |
| commit | 74033eb007749c88b84ea883b006a5877355306e (patch) | |
| tree | 8f8b6cb22cc2bf6046ba04e388ea29855a33c597 /addons/payment/static/src | |
| parent | 71cdefd9f41881d9720433d5fc7732759098f9a4 (diff) | |
| parent | 90f8f17fb4fc795c2c12d68d21900e81f3d7a223 (diff) | |
[MERGE] forward port branch saas-11.2 up to 90f8f17fb4f
Diffstat (limited to 'addons/payment/static/src')
| -rw-r--r-- | addons/payment/static/src/js/payment_form.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index 1e0d5e7a0c2..372e8ba233d 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -178,7 +178,7 @@ odoo.define('payment.payment_form', function (require) { }).fail(function (message, data) { self.displayError( _t('Server Error'), - _t("We are not able to redirect you to the payment form.<") + + _t("We are not able to redirect you to the payment form. ") + data.data.message ); }); @@ -221,7 +221,7 @@ odoo.define('payment.payment_form', function (require) { var form_data = this.getFormData(inputs_form); var ds = $('input[name="data_set"]', acquirer_form)[0]; var wrong_input = false; - + inputs_form.toArray().forEach(function (element) { //skip the check of non visible inputs if ($(element).attr('type') == 'hidden') { @@ -397,7 +397,7 @@ odoo.define('payment.payment_form', function (require) { var acquirer_id = this.getAcquirerIdFromRadio(checked_radio); // if we clicked on an add new payment radio, display its form - if (this.isNewPaymentRadio(checked_radio)) { + if (this.isNewPaymentRadio(checked_radio)) { this.$('#o_payment_add_token_acq_' + acquirer_id).removeClass('hidden'); } else if (this.isFormPaymentRadio(checked_radio)) { @@ -415,8 +415,14 @@ odoo.define('payment.payment_form', function (require) { }, displayError: function (title, message) { var $checkedRadio = this.$('input[type="radio"]:checked'), - acquirerID = this.getAcquirerIdFromRadio($checkedRadio[0]), + acquirerID = this.getAcquirerIdFromRadio($checkedRadio[0]); + var $acquirerForm; + if (this.isNewPaymentRadio($checkedRadio[0])) { $acquirerForm = this.$('#o_payment_add_token_acq_' + acquirerID); + } + else if (this.isFormPaymentRadio($checkedRadio[0])) { + $acquirerForm = this.$('#o_payment_form_acq_' + acquirerID); + } if ($checkedRadio.length === 0) { return new Dialog(null, { |
