From f03437ae001622fd58e6029203fa679841dc4499 Mon Sep 17 00:00:00 2001 From: Atchuthan Date: Fri, 1 Dec 2017 15:23:43 +0100 Subject: [PATCH] [FIX] payment: display error message The error message was not displayed as out of the paragraph block Closes #21342 --- addons/payment/static/src/js/payment_form.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index 9cf567f5973..17f67969eba 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -118,7 +118,10 @@ odoo.define('payment.payment_form', function (require) { self.displayError( _t('Server Error'), - _t("

We are not able to add your payment method at the moment.

") + (core.debug ? data.data.message : '') + _t("

We are not able to add your payment method at the moment.

") + + "

" + + (core.debug ? (data.data.message.replace(/\n/g, "
")): '') + + "

" ); }); } @@ -162,7 +165,10 @@ 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.

") + (core.debug ? data.data.message : '') + _t("

We are not able to redirect you to the payment form.

") + + "

" + + (core.debug ? (data.data.message.replace(/\n/g, "
")): '') + + "

" ); }); } @@ -268,7 +274,10 @@ odoo.define('payment.payment_form', function (require) { self.displayError( _t('Server error'), - _t("

We are not able to add your payment method at the moment.

") + (core.debug ? data.data.message : '') + _t("

We are not able to add your payment method at the moment.

") + + "

" + + (core.debug ? (data.data.message.replace(/\n/g, "
")): '') + + "

" ); }); }