<?xml version="1.0" encoding="utf-8"?>
<odoo>
        <template id="contactus_form" name="Contact Form" inherit_id="website.contactus" customize_show="True">
            <xpath expr="//div[@name='mail_button']" position="replace">
                <div>
                    <form action="/website_form/" method="post" data-model_name="crm.lead" data-success_page="/contactus-thank-you" class="s_website_form container-fluid mt32" enctype="multipart/form-data" data-editable-form="false">
                        <div class="form-group row form-field o_website_form_required_custom">
                            <label class="col-lg-3 col-md-4 col-form-label" for="contact_name">Your Name</label>
                            <div class="col-lg-7 col-md-8">
                                <input type="text" class="form-control o_website_form_input" name="contact_name" t-att-value="request.params.get('contact_name', '')" required=""/>
                            </div>
                        </div>
                        <div class="form-group row form-field">
                            <label class="col-lg-3 col-md-4 col-form-label" for="phone">Phone Number</label>
                            <div class="col-lg-7 col-md-8">
                                <input type="text" class="form-control o_website_form_input" name="phone" t-att-value="request.params.get('phone', '')" />
                            </div>
                        </div>
                        <div class="form-group row form-field o_website_form_required_custom">
                            <label class="col-lg-3 col-md-4 col-form-label" for="email_from">Email</label>
                            <div class="col-lg-7 col-md-8">
                                <input type="text" class="form-control o_website_form_input" name="email_from" required="" t-att-value="request.params.get('email_from', '')" />
                            </div>
                        </div>
                        <div class="form-group row form-field o_website_form_required_custom">
                            <label class="col-lg-3 col-md-4 col-form-label" for="partner_name">Your Company</label>
                            <div class="col-lg-7 col-md-8">
                                <input type="text" class="form-control o_website_form_input" name="partner_name" required="" t-att-value="request.params.get('partner_name', '')" />
                            </div>
                        </div>
                        <div class="form-group row form-field o_website_form_required">
                            <label class="col-lg-3 col-md-4 col-form-label" for="name">Subject</label>
                            <div class="col-lg-7 col-md-8">
                                <input type="text" class="form-control o_website_form_input" name="name" required="" t-att-value="request.params.get('name', '')" />
                            </div>
                        </div>
                        <div class="form-group row form-field o_website_form_required_custom">
                            <label class="col-lg-3 col-md-4 col-form-label" for="description">Your Question</label>
                            <div class="col-lg-7 col-md-8">
                                <textarea class="form-control o_website_form_input" name="description" required=""><t t-esc="request.params.get('description', '')"/></textarea>
                            </div>
                        </div>
                        <div class="form-group row">
                            <div class="offset-lg-3 offset-md-4 col-md-8 col-lg-7">
                                <a href="#" role="button" class="btn btn-primary btn-lg o_website_form_send">Send</a>
                                <span id="o_website_form_result"></span>
                            </div>
                        </div>
                    </form>
                </div>
			</xpath>
		</template>
    <record id="contactus_thanks" model="website.page">
        <field name="name">Thanks (Contact us)</field>
        <field name="type">qweb</field>
        <field name="url">/contactus-thank-you</field>
        <field name="website_published">True</field>
        <field name="key">website_crm.contactus_thanks</field>
        <field name="arch" type="xml">
            <t name="Thanks (Contact us)" t-name="website_crm.contactus_thanks">
                <t t-call="website.layout">
                  <div id="wrap">
                    <div class="oe_structure" id="oe_structure_website_crm_contact_us_thanks_1"/>
                    <div class="container">
                        <h1>Thanks!</h1>
                        <div class="row">
                            <div class="col-lg-8">
                                <div class="alert alert-success" role="status">
                                    Your message has been sent successfully.
                                    <button type="button" class="close" data-dismiss="alert">&amp;times;</button>
                                </div>
                                <p>
                                    We will get back to you shortly.
                                </p>
                            </div>
                            <div class="col-lg-4">
                                <t t-call="website.company_description"/>
                            </div>
                        </div>
                    </div>
                    <div class="oe_structure" id="oe_structure_website_crm_contact_us_thanks_2"/>
                  </div>
                </t>
            </t>
        </field>
    </record>

        <template id="website_crm_tests" name="Website CRM Tests" inherit_id="web.assets_common">
            <xpath expr="." position="inside">
                <script type="text/javascript" src="/website_crm/static/src/js/website_crm_tour.js"></script>
            </xpath>
        </template>

</odoo>
