[FIX] payment: de-traw-ify
Mark `display_message` (feedback from payment provider) as markup-safe.
This commit is contained in:
@@ -2,8 +2,8 @@ odoo.define('payment.post_processing', function (require) {
|
||||
'use strict';
|
||||
|
||||
var publicWidget = require('web.public.widget');
|
||||
var ajax = require('web.ajax');
|
||||
var core = require('web.core');
|
||||
const {Markup} = require('web.utils');
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
@@ -92,6 +92,9 @@ odoo.define('payment.post_processing', function (require) {
|
||||
display_values_list.forEach(function (display_values) {
|
||||
var key = 'tx_' + display_values.state;
|
||||
if(key in render_values) {
|
||||
if (display_values["display_message"]) {
|
||||
display_values.display_message = Markup(display_values.display_message)
|
||||
}
|
||||
render_values[key].push(display_values);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<t t-if="tx['display_message']">
|
||||
<!-- display_message is the content of the HTML field associated
|
||||
with the current transaction state, set on the acquirer. -->
|
||||
<t t-raw="tx['display_message']"/>
|
||||
<t t-out="tx['display_message']"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
Your payment is in pending state.<br/>
|
||||
@@ -75,7 +75,7 @@
|
||||
<t t-if="tx['display_message']">
|
||||
<!-- display_message is the content of the HTML field associated
|
||||
with the current transaction state, set on the acquirer. -->
|
||||
<t t-raw="tx['display_message']"/>
|
||||
<t t-out="tx['display_message']"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
Your payment has been received but need to be confirmed manually.<br/>
|
||||
@@ -100,7 +100,7 @@
|
||||
<t t-if="tx['display_message']">
|
||||
<!-- display_message is the content of the HTML field associated
|
||||
with the current transaction state, set on the acquirer. -->
|
||||
<t t-raw="tx['display_message']"/>
|
||||
<t t-out="tx['display_message']"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
We are waiting for the payment acquirer to confirm the payment.
|
||||
|
||||
Reference in New Issue
Block a user