diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
| commit | 5f2d080cf85d54bc52895f9dbc4075b10989d324 (patch) | |
| tree | c925509b609fb07f6fbef8896710b756c3c6a86f /addons/payment/static/src/js/payment_form.js | |
| parent | 026be48ccbbb15daefda070697b135f089f49564 (diff) | |
| parent | ad825b673b57344a6a1571234f62a0b3aa543bf7 (diff) | |
[MERGE] forward port branch 11.0 up to ad825b673b5
Diffstat (limited to 'addons/payment/static/src/js/payment_form.js')
| -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, { |
