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.
 
 
 
 
 

315 lines
16 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="website_customer_contact_detail"
name="Customer Contact Detail">
<!-- This template displays customer Contact details and allows the customer to edit their contact information using a form -->
<t t-call="portal.portal_layout">
<t t-set="breadcrumbs_searchbar" t-value="True"/>
<t t-call="portal.portal_searchbar">
<t t-set="title">Customer Contact</t>
</t>
<!-- Intro -->
<div class="pb-2 pt-3 card-header bg-white"
style="position:relative;">
<h2 class="my-0">
Contact Details
</h2>
<a role="button"
class="btn btn-secondary flex-grow-1 mb-1 createButton"
data-toggle="modal"
id="myModal" data-target="#contactpopup" href="#">
<t>Edit</t>
</a>
</div>
<!-- Information -->
<div id="information">
<div class="pb-2 pt-3 card-header bg-white">
<div class="row">
<div class="mb-3 col-6">
<strong>Name</strong>
<span t-field="customer_contact_portal.name"
style="position: relative; left: 100px;"/>
</div>
<div class="mb-3 col-6">
<strong>Email</strong>
<span t-field="customer_contact_portal.email"
style="position: relative; left: 100px;"/>
</div>
</div>
<div class="row">
<div class="mb-3 col-6">
<t t-if="customer_contact_portal.type=='contact'">
<strong>Title</strong>
<span t-field="customer_contact_portal.title"
style="position: relative; left: 110px;"/>
</t>
<t t-else="">
<strong>Address</strong>
<span t-field="customer_contact_portal.street"/>
</t>
</div>
<div class="mb-3 col-6">
<strong>Phone</strong>
<span t-field="customer_contact_portal.phone"
style="position: relative; left: 92px;"/>
</div>
</div>
<div class="row">
<div class="mb-3 col-6">
<t t-if="customer_contact_portal.type=='contact'">
<strong>Job Position</strong>
<span t-field="customer_contact_portal.function"
style="position: relative; left: 52px;"/>
</t>
<t t-else="">
<strong>Address2</strong>
<span t-field="customer_contact_portal.street2"/>
</t>
</div>
<div class="mb-3 col-6">
<strong>Mobile</strong>
<span t-field="customer_contact_portal.mobile"
style="position: relative; left: 89px;"/>
</div>
</div>
<div class="row">
<t t-if="customer_contact_portal.type!='contact'">
<div class="mb-3 col-2">
<strong>City</strong>
<span t-field="customer_contact_portal.city"/>
</div>
<div class="mb-3 col-2">
<strong>ZIP</strong>
<span t-field="customer_contact_portal.zip"/>
</div>
<div class="mb-3 col-2">
<strong>State</strong>
<span t-field="customer_contact_portal.state_id"/>
</div>
</t>
<div class="mb-3 col-6">
<strong>Notes</strong>
<span t-field="customer_contact_portal.comment"/>
</div>
</div>
<div class="row">
<div class="mb-3 col-6">
<t t-if="customer_contact_portal.type!='contact'">
<strong>Country</strong>
<span t-field="customer_contact_portal.country_id"/>
</t>
</div>
</div>
</div>
</div>
<form action="/contact_request_form/write" method="post"
enctype="multipart/form-data">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<div class="customer_contact_edit_form">
<div id="contactpopup" class="modal fade">
<div class="modal-dialog modal-content"
style="border:solid 2px white; min-height:200px;max-width:800px;margin-top:10px;max-height:46%;">
<div class="modal-body" id="pop_html">
<br/>
<div style="margin-top:-40px" class="mb-4">
<h2 style="text-align:center; font-size 18px; font-weight:bold"
class="o_default_snippet_text">
Contact Form
</h2>
</div>
<div class="form-group row form-field"
style="display:none;">
<div class="col-lg-3 col-md-4">
<label class="col-form-label"
for="dealer_contact">Id *
</label>
</div>
<div class="col-lg-7 col-md-8">
<input id="id1" type="text"
required="True"
class="form-control o_website_form_input"
name="id"
t-att-value="customer_contact_portal.id"/>
</div>
</div>
<div class="form-group row form-field mb-3"
style="justify-content:center;">
<div class="col-lg-3 col-md-3">
<label class="col-form-label" for="id1"
style="position: absolute; left: 69px;">
Name
</label>
</div>
<div class="col-lg-9 col-md-9">
<input id="id1" type="text"
class="form-control w-75 o_website_form_input"
name="name"
t-att-value="customer_contact_portal.name"/>
</div>
</div>
<div class="form-group row form-field mb-3"
style="justify-content:center;">
<div class="col-lg-3 col-md-3">
<label class="col-form-label" for="mobile"
style="position: absolute; left: 69px;">
Mobile
</label>
</div>
<div class="col-lg-9 col-md-9">
<input id="mobile_number" type="text"
class="form-control w-75 o_website_form_input"
name="mobile"
t-att-value="customer_contact_portal.mobile"/>
</div>
</div>
<div class="form-group row mb-3 form-field"
style="justify-content:center;">
<div class="col-lg-3 col-md-3">
<label class="col-form-label" for="email"
style="position: absolute; left: 69px;">
Email
</label>
</div>
<div class="col-lg-9 col-md-9">
<input id="email" type="email"
class="form-control w-75 o_website_form_input"
name="email"
t-att-value="customer_contact_portal.email"/>
</div>
</div>
<div class="form-group row mb-3 form-field"
style="justify-content:center;">
<div class="col-lg-3 col-md-3">
<label class="col-form-label" for="phone"
style="position: absolute; left: 69px;">
Phone
</label>
</div>
<div class="col-lg-9 col-md-9">
<input id="phone" type="text"
class="form-control w-75 o_website_form_input"
name="phone"
t-att-value="customer_contact_portal.phone"/>
</div>
</div>
<div class="form-group row form-field">
<div style="margin-top: 16px; display:flex; align-items:center; justify-content:center;"
class="mt-4">
<button type="submit"
id="warranty_submit"
class="btn btn-primary btn-md o_website_form_send"
style="position: absolute; left: 321px;">
Save
</button>
<a href="#"
class="btn o_popup_btn_close o_not_editable o_default_snippet_text pull-right"
data-dismiss="modal"
style="position: absolute; left: 392px;">Cancel
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</t>
</template>
<template id="website_customer_contact" name="Customer Contact">
<!-- This template displays customer contact information -->
<t t-call="portal.portal_layout">
<t t-set="breadcrumbs_searchbar" t-value="True"/>
<t t-call="portal.portal_searchbar">
<t t-set="title">Customer Contact</t>
</t>
<t t-if="customer_contact_portal" t-call="portal.portal_table">
<thead>
<tr class="active">
<th class="text-center">Name</th>
<th class="text-center">Type</th>
<th class="text-center">Email</th>
<th class="text-center">Phone</th>
</tr>
</thead>
<t t-foreach="customer_contact_portal" t-as="contact">
<tr>
<td class="text-center">
<a t-attf-href="/my/contacts/#{contact.id}">
<span t-field="contact.name"/>
</a>
</td>
<td class="text-center">
<span t-field="contact.type"/>
</td>
<td class="text-center">
<span t-field="contact.email"/>
</td>
<td class="text-center">
<span t-field="contact.phone"/>
</td>
</tr>
</t>
</t>
<p t-else="">There are currently no contacts under your account.
</p>
<div style="padding:0 45% 0 45%">
<button class="btn-primary btn-add-contact"
style="margin-top: 16px;">
<a href="/contact_request_form"
style="color: white !important;">Add
</a>
</button>
</div>
</t>
</template>
<template id="website_customer_contact_portal_menu" name="Portal Menu"
inherit_id="portal.portal_breadcrumbs"
priority="60">
<!-- The "Portal Menu" template provides breadcrumb navigation for the customer contact portal,
Showing the current page and allowing users to navigate to previous pages. -->
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
<li t-if="page_name=='customer_contact'"
class="breadcrumb-item active">
<span>Customer Contacts
</span>
</li>
<li t-if="page_name=='customer_contact_details'"
class="breadcrumb-item active">
<a t-attf-href="/my/contacts"
arialabel="Customer Contact Details"
title="Customer Contact Details">
<span>Customer Contacts</span>
</a>
<span>/
<em t-out="customer_contact_portal.name"/>
</span>
</li>
</xpath>
</template>
<template id="website_customer_contact_portal_contact"
name="Portal Contacts" customize_show="True"
inherit_id="portal.portal_my_home"
priority="100">
<!-- This template adds a "Contacts" section to the customer portal homepage. -->
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
<t t-call="portal.portal_docs_entry">
<t t-set="title">Contacts</t>
<t t-set="url" t-value="'/my/contacts'"/>
<t t-set="placeholder_count" t-value="'contact_count'"/>
</t>
</xpath>
</template>
<template id="website_customer_contact_request"
name="Link to frontend portal" inherit_id="portal.user_dropdown">
<!-- This template adds a link to the frontend portal allowing customers to make a contact request,
and inherits from the "portal.user_dropdown" template. -->
<xpath expr="//*[@id='o_logout_divider']" position="before">
<a href="/contact_request_form" role="menuitem"
class="dropdown-item ps-3">
Contact Request
</a>
</xpath>
</template>
</odoo>