[FIX] payment: de-t-raw-ify
The *_msg fields are HTML fields so there's no reason to do anything. A few of the values are a bit more debatable though: * Thanks_msg seems pretty much never used? * The `message` value comes from `state_message`, looking at how that's set it doesn't seem like there's any reason for it to ever contain markup?
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
<xpath expr="//a[hasclass('close')]" position="after">
|
||||
<t t-if="success == 'pay_invoice'">
|
||||
<t t-set="payment_tx_id" t-value="invoice.get_portal_last_transaction()"/>
|
||||
<span t-if='payment_tx_id.acquirer_id.sudo().done_msg' t-raw="payment_tx_id.acquirer_id.sudo().done_msg"/>
|
||||
<span t-if='payment_tx_id.acquirer_id.sudo().done_msg' t-out="payment_tx_id.acquirer_id.sudo().done_msg"/>
|
||||
<div t-if="payment_tx_id.acquirer_id.sudo().pending_msg and payment_tx_id.provider == 'transfer' and invoice.ref">
|
||||
<b>Communication: </b><span t-esc='invoice.ref'/>
|
||||
</div>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
HTML field associated with the transaction state, defined on the
|
||||
acquirer. -->
|
||||
<div t-attf-class="alert alert-#{status}"
|
||||
t-raw="message"
|
||||
t-out="message"
|
||||
role="status"/>
|
||||
<div class="form-group row">
|
||||
<label for="form_partner_name" class="col-md-3 col-form-label">
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<t t-call="payment.icon_list"/>
|
||||
<!-- === Help message === -->
|
||||
<div t-if="acquirer.pre_msg"
|
||||
t-raw="acquirer.pre_msg"
|
||||
t-out="acquirer.pre_msg"
|
||||
class="text-muted ml-3"/>
|
||||
</div>
|
||||
<!-- === Acquirer inline form === -->
|
||||
@@ -209,7 +209,7 @@
|
||||
<t t-call="payment.icon_list"/>
|
||||
<!-- === Help message === -->
|
||||
<div t-if="acquirer.pre_msg"
|
||||
t-raw="acquirer.pre_msg"
|
||||
t-out="acquirer.pre_msg"
|
||||
class="text-muted ml-3"/>
|
||||
</div>
|
||||
<!-- === Acquirer inline form === -->
|
||||
@@ -336,19 +336,19 @@
|
||||
-->
|
||||
<div t-if="tx.state == 'pending'" class="alert alert-warning alert-dismissible">
|
||||
<span t-if='tx.acquirer_id.sudo().pending_msg'
|
||||
t-raw="tx.acquirer_id.sudo().pending_msg"/>
|
||||
t-out="tx.acquirer_id.sudo().pending_msg"/>
|
||||
<button class="close" data-dismiss="alert" title="Dismiss">×</button>
|
||||
</div>
|
||||
<div t-elif="tx.state == 'authorized'" class="alert alert-success alert-dismissible">
|
||||
<span t-if='tx.acquirer_id.sudo().auth_msg' t-raw="tx.acquirer_id.sudo().auth_msg"/>
|
||||
<span t-if='tx.acquirer_id.sudo().auth_msg' t-out="tx.acquirer_id.sudo().auth_msg"/>
|
||||
<button class="close" data-dismiss="alert" title="Dismiss">×</button>
|
||||
</div>
|
||||
<div t-elif="tx.state == 'done'" class="alert alert-success alert-dismissible">
|
||||
<span t-if='tx.acquirer_id.sudo().done_msg' t-raw="tx.acquirer_id.sudo().done_msg"/>
|
||||
<span t-if='tx.acquirer_id.sudo().done_msg' t-out="tx.acquirer_id.sudo().done_msg"/>
|
||||
<button class="close" data-dismiss="alert" title="Dismiss">×</button>
|
||||
</div>
|
||||
<div t-elif="tx.state == 'cancel'" class="alert alert-danger alert-dismissible">
|
||||
<span t-if='tx.acquirer_id.sudo().cancel_msg' t-raw="tx.acquirer_id.sudo().cancel_msg"/>
|
||||
<span t-if='tx.acquirer_id.sudo().cancel_msg' t-out="tx.acquirer_id.sudo().cancel_msg"/>
|
||||
<button class="close" data-dismiss="alert" title="Dismiss">×</button>
|
||||
</div>
|
||||
<span t-if="tx.state_message" t-esc="tx.state_message"/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<template id="transfer_transaction_status" inherit_id="payment.transaction_status">
|
||||
<xpath expr="//span[@t-raw='tx.acquirer_id.sudo().pending_msg']" position="after">
|
||||
<xpath expr="//span[@t-out='tx.acquirer_id.sudo().pending_msg']" position="after">
|
||||
<t t-if="tx.acquirer_id.sudo().provider == 'transfer'">
|
||||
<div t-if="tx.reference">
|
||||
<strong>Communication: </strong><span t-esc="tx.reference"/>
|
||||
|
||||
Reference in New Issue
Block a user