Debian Codegraph @

addons/pos_online_payment/views/payment_portal_templates.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3
4 <!-- Display of /pos/pay (the order of the if conditions matters)-->
5 <template id="pay">
6 <t t-call="portal.frontend_layout">
7 <t t-set="page_title">Payment</t>
8 <t t-set="additional_title">
9 <t t-esc="page_title" />
10 </t>
11 <t t-set="no_footer" t-value="1"/>
12 <t t-set="no_header" t-value="1"/>
13
14 <div class="wrap">
15 <div class="d-flex flex-column vh-100">
16 <div class="d-flex justify-content-between p-3 border-bottom border-top bg-light text-center">
17 <span class="order-reference fw-bolder" t-out="reference_prefix"/>
18 <span class="order-id text-muted"> Order ID: <t t-out="pos_order_id"/></span>
19 </div>
20 <div class="d-flex flex-column p-3">
21 <h4 class="d-flex gap-3 align-items-center mb-3 fs-6 small text-uppercase fw-bolder">
22 To Pay
23 <hr class="flex-grow-1 m-0"/>
24 </h4>
25 <span t-if="not currency" class="alert alert-danger m-0">
26 <strong>Error:</strong> The currency is missing or invalid.
27 </span>
28 <span t-elif="not amount" class="alert alert-info m-0">
29 There is nothing to pay.
30 </span>
31 <span t-else="">
32 <t t-call="pos_online_payment.pay_summary"/>
33 <t t-call="payment.form" />
34 </span>
35 </div>
36 <div class="d-grid p-3" t-if="exit_route">
37 <a role="button" class="btn btn-light btn-lg border py-3" t-att-href="exit_route">
38 Cancel payment
39 </a>
40 </div>
41 </div>
42 </div>
43 </t>
44 </template>
45
46 <template id="pay_summary">
47 <span id="o_pos_summary_amount"
48 t-out="amount"
49 t-options="{'widget': 'monetary', 'display_currency': currency}"
50 class="fs-1 text-primary fw-bold"
51 />
52 </template>
53
54 <!-- Display of /pos/pay/confirmation -->
55 <template id="pay_confirmation">
56 <t t-call="portal.frontend_layout">
57 <t t-set="page_title">Payment Confirmation</t>
58 <t t-set="additional_title">
59 <t t-esc="page_title" />
60 </t>
61 <t t-set="no_footer" t-value="1"/>
62 <t t-set="no_header" t-value="1"/>
63
64 <div class="wrap">
65 <div class="container d-flex flex-column vh-100 pb-3">
66 <div class="row flex-grow-1">
67 <div class="col mt-3">
68 <t t-if="state == 'error'">
69 <div class="alert alert-danger">
70 <strong>Error:</strong> There was a problem during the payment process.
71 </div>
72 </t>
73 <t t-else="">
74 <t t-call="payment.state_header"/>
75 <div class="row row-cols-1 row-cols-sm-2">
76 <t t-if="state == 'success'">
77 <div class="col fw-bold">Amount</div>
78 <div class="col mb-2 mb-lg-0 text-start text-sm-end" t-out="amount" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
79 </t>
80
81 <div class="col fw-bold">Order Reference</div>
82 <div t-out="order_reference" class="col mb-2 mb-lg-0 text-start text-sm-end"/>
83
84 <div class="col fw-bold">Transaction Reference</div>
85 <div t-out="tx_reference" class="col mb-2 mb-lg-0 text-start text-sm-end"/>
86
87 <div class="col fw-bold">Order ID</div>
88 <div t-out="pos_order_id" class="col mb-2 mb-lg-0 text-start text-sm-end"/>
89 </div>
90 </t>
91 </div>
92 </div>
93 <div class="row g-2 row-cols-1 justify-content-between">
94 <div t-if="exit_route" class="col col-sm-auto me-auto">
95 <a role="button" t-att-class="'btn btn-lg w-100 ' + ('btn-primary' if state == 'success' else 'btn-light border')" t-att-href="exit_route">
96 <t t-esc="'Continue' if state == 'success' else 'Cancel payment'"/>
97 </a>
98 </div>
99 <div t-if="pay_route and state != 'success'" class="col col-sm-auto ms-auto">
100 <a role="button" class="btn btn-primary btn-lg w-100" t-att-href="pay_route"
101 >
102 Try again
103 </a>
104 </div>
105 </div>
106 <div class="row" t-if="state == 'success'">
107 <div class="mb-3 text-muted text-center">
108 Processed by
109 <t t-esc="provider_name"/>
110 </div>
111 </div>
112 </div>
113 </div>
114 </t>
115 </template>
116
117 </odoo>