285 lines
17 KiB
XML
285 lines
17 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!--
|
|
Multiple Login Page Templates with Different HTML Structures
|
|
Standalone templates rendered by the /web/login override.
|
|
Each template calls web.layout and defines its own login form.
|
|
-->
|
|
|
|
<!-- Template 1: Modern Card Design -->
|
|
|
|
<template id="login_template_modern_page" name="Modern Login Template"
|
|
inherit_id="website.login_layout" active="False">
|
|
|
|
<xpath expr="//div[contains(@class, 'oe_website_login_container')]" position="replace">
|
|
<t t-set="login_template"
|
|
t-value="request.env['expert.login.template'].sudo().search([('active', '=', True)], limit=1)" />
|
|
<style> body.bg-100 { background-color: <t
|
|
t-if="login_template and login_template.background_color">
|
|
<t t-esc="login_template.background_color" />
|
|
</t><t t-else="">
|
|
#19181F</t> !important; } </style>
|
|
<t t-set="body_classname" t-value="'bg-100'" />
|
|
<t t-set="no_header" t-value="True" />
|
|
<t t-set="no_footer" t-value="True" />
|
|
|
|
<div class="expert-login-modern">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<!-- Left Column: Login Form (6 columns) -->
|
|
<div class="col-lg-6 col-md-12 expert-login-left">
|
|
<div class="expert-login-form-container">
|
|
<!-- Logo and Text -->
|
|
<div class="expert-login-logo">
|
|
<t t-if="login_template and login_template.modern_template_logo">
|
|
<img
|
|
t-att-src="'data:image/png;base64,%s' % login_template.modern_template_logo.decode('utf-8')"
|
|
alt="Company Logo"
|
|
style="width: 40px; height: 40px; object-fit: contain; margin-right: 12px;" />
|
|
<span class="expert-logo-text">Expert</span>
|
|
</t>
|
|
<t t-else="">
|
|
<div class="expert-logo-icon">
|
|
<span>E</span>
|
|
</div>
|
|
<span class="expert-logo-text">Expert</span>
|
|
</t>
|
|
</div>
|
|
|
|
<!-- Welcome Text -->
|
|
<div class="expert-login-welcome">
|
|
<h1>
|
|
<t
|
|
t-if="login_template and login_template.modern_login_title">
|
|
<t t-esc="login_template.modern_login_title" />
|
|
</t>
|
|
<t t-else=""> Welcome to Expert <span class="welcome-emoji">
|
|
👋</span>
|
|
</t>
|
|
</h1>
|
|
<p>
|
|
<t
|
|
t-if="login_template and login_template.modern_login_subtitle">
|
|
<t t-esc="login_template.modern_login_subtitle" />
|
|
</t>
|
|
<t t-else="">
|
|
Kindly fill in your details below to sign in to your
|
|
account
|
|
</t>
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Login Form -->
|
|
<div class="expert-login-form">
|
|
<t t-out="0" />
|
|
</div>
|
|
|
|
<!-- Button Styles -->
|
|
<style> .expert-modern-login-btn { background-color: <t
|
|
t-if="login_template and login_template.modern_login_button_bg_color">
|
|
<t t-esc="login_template.modern_login_button_bg_color" />
|
|
</t><t
|
|
t-else="">#007bff</t> !important; color: <t
|
|
t-if="login_template and login_template.modern_login_button_text_color">
|
|
<t t-esc="login_template.modern_login_button_text_color" />
|
|
</t><t
|
|
t-else="">#FFFFFF</t> !important; border: none !important; }
|
|
.expert-modern-login-btn:hover { background-color: <t
|
|
t-if="login_template and login_template.modern_login_button_bg_hover">
|
|
<t t-esc="login_template.modern_login_button_bg_hover" />
|
|
</t><t
|
|
t-else="">#0056b3</t> !important; color: <t
|
|
t-if="login_template and login_template.modern_login_button_text_hover">
|
|
<t t-esc="login_template.modern_login_button_text_hover" />
|
|
</t><t
|
|
t-else="">#FFFFFF</t> !important; } </style>
|
|
|
|
<!-- Signup Link -->
|
|
<!-- <div class="expert-login-link">
|
|
<p> Don't have an account? <a
|
|
t-attf-href="/web/signup?{{ keep_query() }}">Sign Up</a>
|
|
</p>
|
|
</div> -->
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Right Column: Image (6 columns) -->
|
|
<div class="col-lg-6 col-md-12 d-none d-lg-block expert-login-right">
|
|
<div class="expert-login-image">
|
|
<div class="expert-login-image-cover"
|
|
t-if="login_template.modern_template_image"
|
|
t-attf-style="background-image: url('#{'/web/image/expert.login.template/'+str(login_template.id)+'/modern_template_image' if login_template else '/expert_theme/static/src/img/modern-template-bg.png' }');" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Template 2: Minimal Design -->
|
|
<template id="login_template_minimal_page" name="Minimal Login Template"
|
|
inherit_id="website.login_layout" active="False">
|
|
|
|
<xpath expr="//div[contains(@class, 'oe_website_login_container')]" position="replace">
|
|
<t t-set="login_template"
|
|
t-value="request.env['expert.login.template'].sudo().search([('active', '=', True)], limit=1)" />
|
|
<style> body.bg-100 { background-color: <t
|
|
t-if="login_template and login_template.background_color">
|
|
<t t-esc="login_template.background_color" />
|
|
</t><t t-else="">
|
|
#19181F</t> !important; } </style>
|
|
<t t-set="body_classname" t-value="'bg-100'" />
|
|
|
|
<div class="expert-login-minimal">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<!-- Left Column: Login Form (6 columns) -->
|
|
<div class="col-lg-6 col-md-12 expert-login-left">
|
|
<div class="expert-login-form-container">
|
|
<!-- Logo and Text -->
|
|
<div class="expert-login-logo">
|
|
<t t-if="login_template and login_template.minimal_template_logo">
|
|
<img
|
|
t-att-src="'data:image/png;base64,%s' % login_template.minimal_template_logo.decode('utf-8')"
|
|
alt="Company Logo"
|
|
style="width: 40px; height: 40px; object-fit: contain; margin-right: 12px;" />
|
|
<span class="expert-logo-text">Expert</span>
|
|
</t>
|
|
<t t-else="">
|
|
<div class="expert-logo-icon">
|
|
<span>E</span>
|
|
</div>
|
|
<span class="expert-logo-text">Expert</span>
|
|
</t>
|
|
</div>
|
|
|
|
<!-- Welcome Text -->
|
|
<div class="expert-login-welcome">
|
|
<h1>
|
|
<t t-if="login_template and login_template.minimal_login_title">
|
|
<t t-esc="login_template.minimal_login_title" />
|
|
</t>
|
|
<t t-else=""> Welcome to Expert <span class="welcome-emoji">👋</span>
|
|
</t>
|
|
</h1>
|
|
<p>
|
|
<t
|
|
t-if="login_template and login_template.minimal_login_subtitle">
|
|
<t t-esc="login_template.minimal_login_subtitle" />
|
|
</t>
|
|
<t t-else="">
|
|
Kindly fill in your details below to sign in to your account
|
|
</t>
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Login Form -->
|
|
<div class="expert-login-form">
|
|
<t t-out="0" />
|
|
</div>
|
|
|
|
<!-- Button Styles -->
|
|
<style> .expert-minimal-login-btn { background-color: <t
|
|
t-if="login_template and login_template.minimal_login_button_bg_color">
|
|
<t t-esc="login_template.minimal_login_button_bg_color" />
|
|
</t><t
|
|
t-else="">#E5E5E5</t> !important; color: <t
|
|
t-if="login_template and login_template.minimal_login_button_text_color">
|
|
<t t-esc="login_template.minimal_login_button_text_color" />
|
|
</t><t
|
|
t-else="">#000000</t> !important; border: none !important; }
|
|
.expert-minimal-login-btn:hover { background-color: <t
|
|
t-if="login_template and login_template.minimal_login_button_bg_hover">
|
|
<t t-esc="login_template.minimal_login_button_bg_hover" />
|
|
</t><t
|
|
t-else="">#D0D0D0</t> !important; color: <t
|
|
t-if="login_template and login_template.minimal_login_button_text_hover">
|
|
<t t-esc="login_template.minimal_login_button_text_hover" />
|
|
</t><t
|
|
t-else="">#000000</t> !important; } </style>
|
|
|
|
<!-- Signup Link -->
|
|
<!-- <div class="expert-login-link">
|
|
<p> Don't have an account? <a
|
|
t-attf-href="/web/signup?{{ keep_query() }}">Sign Up</a>
|
|
</p>
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Right Column: Image (6 columns) -->
|
|
<div class="col-lg-6 col-md-12 d-none d-lg-block expert-login-right">
|
|
<div class="expert-login-image">
|
|
<img t-if="login_template and login_template.minimal_template_image"
|
|
t-att-src="'/web/image/expert.login.template/%s/minimal_template_image' % login_template.id"
|
|
alt="Signup Illustration"
|
|
class="img-fluid expert-minimal-illustration" />
|
|
<img t-else=""
|
|
src="/expert_theme/static/src/img/minimal-login-img.png"
|
|
alt="Signup Illustration"
|
|
class="img-fluid expert-minimal-illustration" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Template 3: Corporate Design -->
|
|
<template id="login_template_corporate_page" name="Corporate Login Template">
|
|
<t t-call="web.layout">
|
|
<t t-set="head">
|
|
<style> body.bg-100 { background-color: <t
|
|
t-if="login_template and login_template.background_color">
|
|
<t t-esc="login_template.background_color" />
|
|
</t><t
|
|
t-else="">#1a1a1a</t> !important; } </style>
|
|
</t>
|
|
<div class="oe_login_form"
|
|
t-attf-style="background: {{login_template.background_color if login_template and login_template.background_color else '#1a1a1a'}}; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;">
|
|
<div
|
|
style="width: 100%; max-width: 500px; background: #2d2d2d; padding: 60px 50px; border-radius: 8px; border: 1px solid #404040;">
|
|
<div class="text-center mb-5">
|
|
<h2
|
|
style="color: #fff; font-size: 32px; font-weight: 600; margin-bottom: 10px;">Company
|
|
Portal</h2>
|
|
<p style="color: #999; font-size: 14px; margin: 0;">Secure Login Access</p>
|
|
</div>
|
|
<form class="oe_login_form" role="form" method="post"
|
|
t-att-action="request.httprequest.path">
|
|
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
|
<input type="hidden" name="redirect" t-att-value="redirect or ''" />
|
|
|
|
<div style="margin-bottom: 25px;">
|
|
<label
|
|
style="color: #ccc; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: block;">
|
|
Username</label>
|
|
<input type="text" name="login" class="form-control"
|
|
placeholder="Enter your username"
|
|
t-att-value="login"
|
|
style="background: #1a1a1a; border: 1px solid #404040; color: #fff; padding: 12px 15px; border-radius: 4px; width: 100%; box-sizing: border-box;" />
|
|
</div>
|
|
|
|
<div style="margin-bottom: 35px;">
|
|
<label
|
|
style="color: #ccc; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: block;">
|
|
Password</label>
|
|
<input type="password" name="password" class="form-control"
|
|
placeholder="Enter your password"
|
|
style="background: #1a1a1a; border: 1px solid #404040; color: #fff; padding: 12px 15px; border-radius: 4px; width: 100%; box-sizing: border-box;" />
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-block"
|
|
style="width: 100%; background: #007bff; color: white; border: none; padding: 14px; font-size: 15px; font-weight: 600; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;">
|
|
Access Portal
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
|
|
</odoo> |