You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

137 lines
9.1 KiB

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Template for the pre-book address-->
<template id="prebook_address">
<t t-set="no_footer" t-value="1"/>
<t t-call="website.layout">
<div id="wrap">
<div class="container oe_website_sale py-2">
<div class="row">
<div class="col-12 col-xl order-xl-1 oe_cart">
<div>
<form action="/prebook/address" method="post" class="checkout_autoformat">
<div class="row">
<div t-attf-class="mb-3 #{'o_has_error' or ''} col-lg-12 div_name">
<label class="col-form-label" for="name">Name</label>
<input type="text" name="name"
t-attf-class="form-control #{'is-invalid' or ''}"
t-att-value="'name'" required="required"/>
</div>
<div class="w-100"/>
<div t-attf-class="mb-3 #{'o_has_error' or ''} col-lg-6" id="div_email">
<label t-attf-class="col-form-label #{'label-optional' or ''}" for="email">
Email
</label>
<input type="email" name="email"
t-attf-class="form-control #{'is-invalid' or ''}"
t-att-value="'email'"/>
</div>
<div t-attf-class="mb-3 #{'o_has_error' or ''} col-lg-6" id="div_phone">
<label class="col-form-label" for="phone">Phone</label>
<input type="tel" name="phone"
t-attf-class="form-control #{'is-invalid' or ''}"
t-att-value="'phone'"/>
</div>
<t t-if="website._display_partner_b2b_fields()">
<div class="w-100"/>
<t t-set='vat_warning' t-value="'vat'"/>
<t t-if="mode == ('new', 'billing') or (mode == ('edit', 'billing') and (can_edit_vat or 'vat' in checkout and checkout['vat']))">
<div t-attf-class="mb-3 #{'o_has_error' or ''} col-lg-6 mb-0">
<label class="col-form-label fw-normal label-optional"
for="company_name">Company Name
</label>
<input type="text" name="company_name"
t-attf-class="form-control #{'is-invalid' or ''}"
t-att-value="'commercial_company_name' or 'company_name'"
t-att-readonly="'1' if vat_warning else None"/>
<small t-if="vat_warning"
class="form-text text-muted d-block d-lg-none">Changing
company name is not allowed once document(s) have been issued
for your account. Please contact us directly for this operation.
</small>
</div>
<div t-attf-class="mb-3 #{'o_has_error' or ''} col-lg-6 div_vat mb-0">
<label class="col-form-label fw-normal label-optional" for="vat">TIN
/ VAT
</label>
<input type="text" name="vat"
t-attf-class="form-control #{'is-invalid' or ''}"
t-att-value="'vat'"
t-att-readonly="'1' if vat_warning else None"/>
<small t-if="vat_warning"
class="form-text text-muted d-block d-lg-none">Changing VAT
number is not allowed once document(s) have been issued for your
account. Please contact us directly for this operation.
</small>
</div>
<div t-if="vat_warning" class="col-12 d-none d-lg-block mb-1">
<small class="form-text text-muted">Changing company name or VAT
number is not allowed once document(s) have been issued for your
account. Please contact us directly for this operation.
</small>
</div>
</t>
</t>
<div class="w-100"/>
</div>
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<input type="hidden" name="submitted" value="1"/>
<input type="hidden" name="product" t-att-value="product"/>
<input type="hidden" name="quantity" t-att-value="quantity"/>
<input type="hidden" name="partner_id" t-att-value="partner_id or '0'"/>
<input type="hidden" name="callback" t-att-value="callback"/>
<input type="hidden" name="field_required" t-att-value="'phone,name'"/>
<div class="d-flex justify-content-between">
<a role="button"
t-att-href="mode == ('new', 'billing') and '/shop/cart' or '/shop/checkout'"
class="btn btn-secondary mb32">
<i class="fa fa-chevron-left"/>
<span>Back</span>
</a>
<a role="button" type="submit" href="#"
class="btn btn-primary mb32 a-submit a-submit-disable a-submit-loading">
<span>Next</span>
<i class="fa fa-chevron-right"/>
</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<!-- Template for the pre-book success page-->
<template id="pre_booking_done">
<t t-call="website.layout">
<h2 style="text-align: center; margin-top: 140px; font-style: normal;">
Prebooking (<t t-esc="ref"/>) successfully created...!
</h2>
<div class="text-center" style="padding-top:10mm; ">
<button class="button-40" style="background-color: #0f0c0dbf;">
<a role="menuitem" t-attf-href="/@/shop" style="color: #f8f9fa;">
Back
</a>
</button>
</div>
</t>
</template>
<!--Template for pre-book fail-->
<template id="pre_booking_failed">
<t t-call="website.layout">
<h2 style="text-align: center; margin-top: 140px; font-style: normal;">
Sorry Your entry exceeds the maximum value.
</h2>
<div class="text-center" style="padding-top:10mm; ">
<button class="button-40" style="background-color: #0f0c0dbf;">
<a role="menuitem" t-attf-href="/@/shop" style="color: #f8f9fa;">
Back
</a>
</button>
</div>
</t>
</template>
</odoo>