mirror of
https://github.com/bringout/oca-ocb-security.git
synced 2026-04-23 19:21:59 +02:00
117 lines
6.4 KiB
XML
117 lines
6.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="auth_signup.login" inherit_id="web.login" name="Sign up - Reset Password">
|
|
<xpath expr="//div[hasclass('oe_login_buttons')]/button" position="after">
|
|
<a t-if="signup_enabled" class="btn btn-link btn-sm mt-2" t-attf-href="/web/signup?{{ keep_query() }}">Don't have an account?</a>
|
|
</xpath>
|
|
<xpath expr="//label[@for='password']" position="after">
|
|
<a t-if="reset_password_enabled" class="btn btn-link btn-sm" tabindex="1" t-attf-href="/web/reset_password?{{ keep_query() }}">Reset Password</a>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="auth_signup.fields" name="Auth Signup/ResetPassword form fields">
|
|
<div class="mb-3 field-password pt-2 o_caps_lock_warning">
|
|
<label for="password" class="form-label">Password</label>
|
|
<div class="input-group mb-1">
|
|
<input type="password" name="password" id="password" class="form-control"
|
|
required="required" t-att-autofocus="'autofocus' if autofocus else None" placeholder="••••••••••"/>
|
|
<button type="button" class="btn btn-sm border border-start-0 o_show_password">
|
|
<i class="fa fa-eye"/>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-3 field-confirm_password">
|
|
<label for="confirm_password" class="form-label">Confirm Password</label>
|
|
<div class="input-group mb-1">
|
|
<input type="password" name="confirm_password" id="confirm_password" class="form-control" required="required" placeholder="••••••••••"/>
|
|
<button type="button" class="btn btn-sm border border-start-0 o_show_password">
|
|
<i class="fa fa-eye"/>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<template id="auth_signup.signup" name="Sign up login">
|
|
<t t-call="web.login_layout">
|
|
<div class="oe_structure" id="oe_structure_signup_top"/>
|
|
<form class="oe_signup_form" role="form" method="post" t-if="not message" data-captcha="signup">
|
|
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
|
|
|
<div class="mb-3 field-name">
|
|
<label for="name" class="form-label">Name</label>
|
|
<input type="text" name="name" t-att-value="name" id="name" class="form-control" placeholder="John Doe"
|
|
autofocus="autofocus" required="required"/>
|
|
</div>
|
|
|
|
<div class="mb-3 field-login">
|
|
<label for="login" class="form-label">Email</label>
|
|
<input type="text" name="login" t-att-value="login" id="login" class="form-control"
|
|
t-att-autofocus="'autofocus' if login else None"
|
|
autocapitalize="off" required="required" placeholder="name@example.com"/>
|
|
</div>
|
|
|
|
<t t-call="auth_signup.fields"/>
|
|
|
|
<p class="alert alert-danger" t-if="error" role="alert">
|
|
<t t-esc="error"/>
|
|
</p>
|
|
<input type="hidden" name="redirect" t-att-value="redirect"/>
|
|
<input type="hidden" name="token" t-att-value="token"/>
|
|
<div class="text-center oe_login_buttons d-grid pt-3">
|
|
<button type="submit" class="btn btn-primary mb-1"> Sign up</button>
|
|
<a t-attf-href="/web/login?{{ keep_query() }}" class="btn btn-link btn-sm mt-2" role="button">Already have an account?</a>
|
|
<t t-call="web.login_oauth"/>
|
|
</div>
|
|
</form>
|
|
<div class="oe_structure" id="oe_structure_signup_bottom"/>
|
|
</t>
|
|
</template>
|
|
|
|
<template id="auth_signup.reset_password" name="Reset password">
|
|
<t t-call="web.login_layout">
|
|
<div class="oe_structure" id="oe_structure_reset_password_top"/>
|
|
<div t-if="message" class="oe_login_form clearfix">
|
|
<p class="alert alert-success" t-if="message" role="status">
|
|
<t t-esc="message"/>
|
|
</p>
|
|
<a href="/web/login" class="btn btn-link btn-sm float-start" role="button">Back to Login</a>
|
|
</div>
|
|
|
|
<form class="oe_reset_password_form" role="form" method="post" t-if="not message" data-captcha="password_reset">
|
|
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
|
|
|
<t t-if="token and not invalid_token">
|
|
<t t-call="auth_signup.fields">
|
|
<t t-set="autofocus" t-value="1"/>
|
|
</t>
|
|
</t>
|
|
|
|
<t t-if="not token">
|
|
<div class="mb-3 field-login">
|
|
<label for="login" class="col-form-label">Email</label>
|
|
<input type="text" name="login" t-att-value="login" id="login" class="form-control"
|
|
autofocus="autofocus" required="required" autocapitalize="off"/>
|
|
</div>
|
|
</t>
|
|
|
|
<p class="alert alert-danger" t-if="error" role="alert">
|
|
<t t-esc="error"/>
|
|
</p>
|
|
<input type="hidden" name="redirect" t-att-value="redirect"/>
|
|
<input type="hidden" name="token" t-att-value="token"/>
|
|
<div class="clearfix oe_login_buttons d-grid mt-3">
|
|
<button type="submit" class="btn btn-primary">Reset Password</button>
|
|
<div class="d-flex justify-content-between align-items-center small mt-2">
|
|
<a t-if="not token" t-attf-href="/web/login?{{ keep_query() }}">Back to Login</a>
|
|
<a t-if="invalid_token" href="/web/login">Back to Login</a>
|
|
</div>
|
|
<t t-call="web.login_oauth"/>
|
|
</div>
|
|
|
|
</form>
|
|
<div class="oe_structure" id="oe_structure_reset_password_bottom"/>
|
|
|
|
</t>
|
|
</template>
|
|
</odoo>
|