Per discussion: the marketing homepage looked polished but the rest of the public site (the admission form, contact us, the backend login screen) was still bare stock Odoo, and the site nav still showed stock Odoo's own default logo/favicon rather than Metatroncube's real ones. This brings the same design system (Manrope + Work Sans, the navy/indigo palette) to all three pages and wires up the two supplied brand assets - static/img/logo.png (the wordmark, used as website.logo, so it renders in every page's nav automatically) and static/img/favicon.png (the cube mark, website.favicon). Loaded via a post_init_hook (hooks.py) rather than a plain <record>: website's two stock demo sites (website.default_website, website.website2) are both noupdate=True, and Python is the tool that isn't gated by that the way a <record>/<function> tag would be on an already-installed database (see hooks.py's own docstring for the exact mechanism and its fresh-install-only limitation). Admissions keeps its exact form markup/field names/model untouched - only the surrounding hero and "what happens next" strip are new, added via position="before"/"after" around the existing <section> so the stock s_website_form JS widget this page depends on is never touched. Restyling contact us and the login screen surfaced a chain of real, separate placeholder-content bugs, each found by looking at the next page down rather than assuming the previous fix was complete: 1. website.contactus's sidebar hardcodes "My Company" and a fake US street address - shared/DEMO_SCRIPT.md explicitly bans placeholder content, and it had been live here the whole time. Reading res_company fields instead means it shows whichever school is actually active, same as the admission form's own live program list. 2. website.footer_custom - the footer on EVERY page, not just contact us - carries the identical yourcompany.example.com / +1 555-555-5556 placeholder, plus a "Products/Services/Legal" link list to nowhere and dead social icons. Fixing #1 alone would have left this sitting directly underneath it on every single page. 3. website.header_text_element, the nav bar's own phone/email widget, carries the same fake number - a fourth, separate occurrence, this time in the header. First pass here fixed only its "phone_mail" variant, assumed (wrongly) to be what this site's header actually uses; the live page still showed the fake number afterward. It turned out both nav slots (desktop, mobile) use the plain default branch instead - caught only by re-checking the real page rather than trusting that assumption, and fixed every variant that carries contact info this time, not just the one guessed at. 4. Underneath all three page-level fixes: base.main_company itself still carried stock Odoo's own demo phone (+1 555-555-5556) and email (info@yourcompany.com) - the page-level fixes above only surfaced this because they read real company data for the first time; the data itself needed fixing too. Real Indian/Canadian contact details added to both demo companies in mc_theme_demo.xml. 5. web.login_layout hardcodes its own separate "Powered by Odoo" link - a third distinct occurrence, different from the portal sidebar text and the web.brand_promotion badge already fixed, reached by the very first screen anyone doing this demo sees. Full suite (all 9 modules + web_responsive) re-verified together after every fix in this chain: 0 failed, 0 error(s), tests up to 93. One correction to this session's own earlier work: mc_cast_users_demo.xml claimed <function> "isn't subject to" the noupdate/mode guard that blocks a plain <record> on an already-installed database - false, odoo/tools/convert.py's _tag_function has the exact same "if self.noupdate and self.mode != 'init': return" check. What actually fixed that earlier bug was applying the change as a one-off manual Python snippet, not the tag choice - the same manual-application pattern used again here for base.main_company's contact fields on the already-running school_demo database. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
162 lines
12 KiB
XML
162 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Same brand/type system as the marketing homepage and the
|
|
admission form: Manrope + Work Sans, the navy/indigo palette.
|
|
Only #wrap is replaced - the t-set/hidden span above it in
|
|
website.contactus (contactus_form_values, used by the
|
|
data-pre-fill JS on the form) live outside #wrap and are left
|
|
completely alone.
|
|
|
|
Two real, separate things fixed while restyling this, not
|
|
just a coat of paint:
|
|
1. Stock Odoo's sidebar hardcodes "My Company" / a fake US
|
|
street address / a placeholder phone and email -
|
|
shared/DEMO_SCRIPT.md's "what must NOT appear" list bans
|
|
exactly this kind of placeholder content, and it was live
|
|
on this page before today. Reading res_company (already
|
|
provided by website.layout) instead means it shows
|
|
whichever school is actually active - correct for the
|
|
same reason the admission form's own program dropdown
|
|
reads live data instead of a fixed list.
|
|
2. The field names/ids/model (mail.mail) are byte-identical
|
|
to stock - this form posts through the exact same
|
|
/website/form/ controller Odoo ships, so no submit
|
|
behaviour changes, only what it looks like. -->
|
|
<template id="contactus_page_branding" inherit_id="website.contactus" name="Contact Us - Metatroncube design">
|
|
<xpath expr="//div[@id='wrap']" position="replace">
|
|
<div id="wrap" class="mc-contact">
|
|
<style>
|
|
.mc-contact{ --navy:#131B2E; --navy-2:#1C2A46; --indigo:#4B3F92; --indigo-2:#2E63B8;
|
|
--paper:#F6F7FB; --card:#FFFFFF; --line:#E4E7F0; --ink:#16192B; --ink-soft:#5B6178;
|
|
--shadow:0 1px 2px rgba(19,27,46,.06), 0 14px 34px -16px rgba(19,27,46,.22);
|
|
font-family:'Work Sans', system-ui, sans-serif; color:var(--ink); background:var(--paper);
|
|
}
|
|
.mc-contact *{ box-sizing:border-box; }
|
|
.mc-contact h1, .mc-contact h2, .mc-contact h5{
|
|
font-family:'Manrope', system-ui, sans-serif; font-weight:800; letter-spacing:-.01em;
|
|
color:var(--ink); margin:0;
|
|
}
|
|
.mc-contact-hero{
|
|
background: radial-gradient(900px 380px at 90% -10%, rgba(75,63,146,.5), transparent 60%),
|
|
linear-gradient(180deg, var(--navy), var(--navy-2));
|
|
color:#fff; padding:52px 24px 60px; text-align:center;
|
|
}
|
|
.mc-contact-hero h1{ color:#fff; font-size:clamp(1.6rem,3.4vw,2.3rem); }
|
|
.mc-contact-hero p{ color:#C4C9E2; max-width:52ch; margin:14px auto 0; font-size:1rem; line-height:1.6; }
|
|
|
|
.mc-contact-body{
|
|
max-width:1000px; margin:-30px auto 0; padding:0 20px 70px;
|
|
display:grid; grid-template-columns:1.4fr 1fr; gap:20px; position:relative;
|
|
}
|
|
@media (max-width:760px){ .mc-contact-body{ grid-template-columns:1fr; } }
|
|
.mc-contact-card{
|
|
background:var(--card); border:1px solid var(--line); border-radius:16px;
|
|
box-shadow:var(--shadow); padding:32px 30px;
|
|
}
|
|
@media (max-width:600px){ .mc-contact-card{ padding:24px 18px; } }
|
|
.mc-contact .s_website_form_label{ font-weight:600; color:var(--ink); font-size:.85rem; width:auto !important; }
|
|
.mc-contact .s_website_form_mark{ color:var(--indigo); }
|
|
.mc-contact .form-control{ border-color:var(--line); border-radius:9px; padding:9px 12px; font-family:'Work Sans', sans-serif; }
|
|
.mc-contact .form-control:focus{ border-color:var(--indigo); box-shadow:0 0 0 3px rgba(75,63,146,.15); }
|
|
.mc-contact .btn-primary{
|
|
background:linear-gradient(90deg, var(--indigo), var(--indigo-2)); border:none;
|
|
padding:10px 24px; border-radius:9px; font-weight:600;
|
|
}
|
|
.mc-contact-info h5{ font-size:1.02rem; margin-bottom:14px; }
|
|
.mc-contact-info ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
|
|
.mc-contact-info li{ display:flex; align-items:flex-start; gap:10px; font-size:.9rem; color:var(--ink-soft); }
|
|
.mc-contact-info .ico{
|
|
width:30px; height:30px; border-radius:8px; background:#F4EEFB; color:var(--indigo);
|
|
display:flex; align-items:center; justify-content:center; flex-shrink:0;
|
|
}
|
|
</style>
|
|
|
|
<div class="mc-contact-hero">
|
|
<h1>Contact us</h1>
|
|
<p>Questions about admissions, fees or anything else - send us a note and we'll get back to you shortly.</p>
|
|
</div>
|
|
|
|
<div class="mc-contact-body">
|
|
<div class="mc-contact-card">
|
|
<section class="s_website_form" data-snippet="s_website_form">
|
|
<form id="contactus_form" action="/website/form/" method="post" enctype="multipart/form-data" class="o_mark_required" data-mark="*" data-model_name="mail.mail" data-success-mode="redirect" data-success-page="/contactus-thank-you" data-pre-fill="true">
|
|
<div class="s_website_form_rows row s_col_no_bgcolor">
|
|
<div class="mb-3 col-lg-6 s_website_form_field s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
|
|
<label class="s_website_form_label" for="contact1">
|
|
<span class="s_website_form_label_content">Name</span>
|
|
<span class="s_website_form_mark"> *</span>
|
|
</label>
|
|
<input id="contact1" type="text" class="form-control s_website_form_input" name="name" required="" data-fill-with="name"/>
|
|
</div>
|
|
<div class="mb-3 col-lg-6 s_website_form_field s_website_form_custom" data-type="char" data-name="Field">
|
|
<label class="s_website_form_label" for="contact2">
|
|
<span class="s_website_form_label_content">Phone Number</span>
|
|
</label>
|
|
<input id="contact2" type="tel" class="form-control s_website_form_input" name="phone" data-fill-with="phone"/>
|
|
</div>
|
|
<div class="mb-3 col-lg-6 s_website_form_field s_website_form_required s_website_form_model_required" data-type="email" data-name="Field">
|
|
<label class="s_website_form_label" for="contact3">
|
|
<span class="s_website_form_label_content">Email</span>
|
|
<span class="s_website_form_mark"> *</span>
|
|
</label>
|
|
<input id="contact3" type="email" class="form-control s_website_form_input" name="email_from" required="" data-fill-with="email"/>
|
|
</div>
|
|
<div class="mb-3 col-lg-6 s_website_form_field s_website_form_custom" data-type="char" data-name="Field">
|
|
<label class="s_website_form_label" for="contact4">
|
|
<span class="s_website_form_label_content">Company</span>
|
|
</label>
|
|
<input id="contact4" type="text" class="form-control s_website_form_input" name="company" data-fill-with="commercial_company_name"/>
|
|
</div>
|
|
<div class="mb-3 col-12 s_website_form_field s_website_form_required s_website_form_model_required" data-type="char" data-name="Field">
|
|
<label class="s_website_form_label" for="contact5">
|
|
<span class="s_website_form_label_content">Subject</span>
|
|
<span class="s_website_form_mark"> *</span>
|
|
</label>
|
|
<input id="contact5" type="text" class="form-control s_website_form_input" name="subject" required=""/>
|
|
</div>
|
|
<div class="mb-3 col-12 s_website_form_field s_website_form_custom s_website_form_required" data-type="text" data-name="Field">
|
|
<label class="s_website_form_label" for="contact6">
|
|
<span class="s_website_form_label_content">Question</span>
|
|
<span class="s_website_form_mark"> *</span>
|
|
</label>
|
|
<textarea id="contact6" class="form-control s_website_form_input" name="description" required="" rows="6"></textarea>
|
|
</div>
|
|
<div class="mb-3 col-12 s_website_form_field s_website_form_dnone">
|
|
<input id="contact7" type="hidden" class="form-control s_website_form_input" name="email_to" t-att-value="res_company.email"/>
|
|
</div>
|
|
<div class="mb-0 py-2 col-12 s_website_form_submit s_website_form_no_submit_label text-end" data-name="Submit Button">
|
|
<div class="s_website_form_label"/>
|
|
<a href="#" role="button" class="btn btn-primary s_website_form_send">Submit</a>
|
|
<span id="s_website_form_result"></span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
</div>
|
|
|
|
<div class="mc-contact-card mc-contact-info">
|
|
<h5 t-esc="res_company.name"/>
|
|
<ul>
|
|
<li t-if="res_company.street">
|
|
<span class="ico"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 21s7-6.3 7-11.5A7 7 0 0 0 5 9.5C5 14.7 12 21 12 21z"/><circle cx="12" cy="9.5" r="2.3"/></svg></span>
|
|
<span>
|
|
<t t-esc="res_company.street"/><br t-if="res_company.city"/>
|
|
<t t-esc="res_company.city"/><t t-if="res_company.country_id"><t t-esc="', '"/><t t-esc="res_company.country_id.name"/></t>
|
|
</span>
|
|
</li>
|
|
<li t-if="res_company.phone">
|
|
<span class="ico"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6 19.8 19.8 0 0 1-3.1-8.6A2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .3 2 .7 3a2 2 0 0 1-.5 2.1L8 10a16 16 0 0 0 6 6l1.2-1.3a2 2 0 0 1 2.1-.5c1 .4 2 .6 3 .7a2 2 0 0 1 1.7 2z"/></svg></span>
|
|
<span t-esc="res_company.phone"/>
|
|
</li>
|
|
<li t-if="res_company.email">
|
|
<span class="ico"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg></span>
|
|
<span t-esc="res_company.email"/>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|