diff options
| author | Damien Bouvy <dbo@odoo.com> | 2015-07-31 10:05:29 +0200 |
|---|---|---|
| committer | Damien Bouvy <dbo@odoo.com> | 2015-09-04 16:08:22 +0200 |
| commit | f341ca62ab1572fe2e564e2a4d2fa32e671e59e3 (patch) | |
| tree | c66a8aaec0b692565add18947008f7047c96878a /addons/website_payment/views/website_payment_templates.xml | |
| parent | f8a98d977e5e665689b9adb3954ef55bbf04008b (diff) | |
[IMP] website_payment: generic payment controller
- generate payment from the frontend using a simple form
- send a payment with a simple url
- define a default provider for payments
Diffstat (limited to 'addons/website_payment/views/website_payment_templates.xml')
| -rw-r--r-- | addons/website_payment/views/website_payment_templates.xml | 88 |
1 files changed, 86 insertions, 2 deletions
diff --git a/addons/website_payment/views/website_payment_templates.xml b/addons/website_payment/views/website_payment_templates.xml index 006229e8a38..f72125c0552 100644 --- a/addons/website_payment/views/website_payment_templates.xml +++ b/addons/website_payment/views/website_payment_templates.xml @@ -2,7 +2,7 @@ <openerp> <data> <template id="header_footer_custom_payment" inherit_id="website.footer_default" customize_show="True" active="False" name="Payment Methods"> - <xpath expr="//div[@id='info']" position="inside"> + <xpath expr="//div[@class='o_my_details']" position="inside"> <h4 class="payment_method_title">Payment Method</h4> <ul class="payment_method_list list-inline"> <t t-foreach="request.website.payment_acquirers()" t-as="acquirer"> @@ -18,13 +18,14 @@ <link rel='stylesheet' href='/website_payment/static/src/css/website_payment.css'/> <script type="text/javascript" src="/website_payment/static/src/js/payment_acquirer.js"></script> <script type="text/javascript" src="/website_payment/static/lib/jquery.payment/jquery.payment.js"></script> + <script type="text/javascript" src="/website_payment/static/src/js/payment_transaction.js"></script> </xpath> </template> <template id="pay_methods" name="Payment Methods"> <t t-call="website.layout"> <t t-set="additional_title">Payment Methods</t> - <div id="wrap"> + <div class="wrap"> <div class="container"> <div class="row"> <div class="col-sm-6"> @@ -82,5 +83,88 @@ </xpath> </template> + <template id="pay"> + <t t-call="website.layout"> + <t t-set="additional_title">Payment</t> + <div class="wrap"> + <div class="container o_website_payment"> + <h1>Payment</h1> + <div class="row"> + <div class="col-md-6"> + <div class="oe_structure"></div> + <div> + <div class="form-horizontal row o_website_payment_new_payment" t-att-data-acquirer_id="acquirer.id" t-att-data-currency_id="currency.id" t-att-data-reference="reference" t-att-data-amount="amount"> + <div class="form-group"> + <label for="form_reference" class="col-sm-3 control-label">Reference</label> + <div class="col-sm-9"> + <span name="form_reference" class="form-control" t-esc="reference"/> + </div> + </div> + <div class="form-group"> + <label for="form_amount" class="col-sm-3 control-label">Amount</label> + <div class="col-sm-9"> + <span name="form_amount" class="form-control" t-esc="amount"/> + <!-- + <span name="form_amount" class="form-control" t-esc="amount" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/> + --> + </div> + </div> + <div class="col-sm-12 o_website_payment_form" t-raw="payment_form"/> + <div class="col-sm-6 col-sm-offset-6 text-muted mt16"> + <img alt="payment_provider_logo" class="pull-right ml8" t-att-src="website.image_url(acquirer, 'image_small')"/> + <span>This transaction will be processed by <t t-esc="acquirer.name"/>.</span> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </t> + </template> + + <template id="confirm"> + <t t-call="website.layout"> + <t t-set="additional_title">Payment</t> + <div class="wrap"> + <div class="container o_website_payment"> + <h1>Payment</h1> + <div class="row"> + <div class="col-md-6"> + <div class="form-horizontal"> + <div t-attf-class="alert alert-#{status}" t-esc="message"/> + <div class="form-group"> + <label for="form_partner_name" class="col-sm-3 control-label">From</label> + <div class="col-sm-9"> + <span name="form_partner_name" class="form-control" t-esc="tx.partner_name"/> + </div> + </div> + <div class="form-group"> + <label for="form_reference" class="col-sm-3 control-label">Reference</label> + <div class="col-sm-9"> + <span name="form_reference" class="form-control" t-esc="tx.reference"/> + </div> + </div> + <div class="form-group"> + <label for="form_amount" class="col-sm-3 control-label">Amount</label> + <div class="col-sm-9"> + <span name="form_amount" class="form-control" t-esc="tx.amount" t-esc-options='{"widget": "monetary", "display_currency": "tx.currency_id"}'/> + </div> + </div> + <div class="col-sm-12"> + <a t-attf-class="btn btn-#{status} pull-right" href="/my/home"><i class="fa fa-arrow-circle-right"/> Back to My Account</a> + </div> + <div class="col-sm-6 col-sm-offset-6 text-muted mt16"> + <img alt="payment_provider_logo" class="pull-right ml8" t-att-src="website.image_url(tx.acquirer_id, 'image_small')"/> + <span>Payment processed by <t t-esc="tx.acquirer_id.name"/>.</span> + </div> + </div> + </div> + </div> + </div> + </div> + </t> + </template> + </data> </openerp> |
