| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <odoo> |
| 3 | <template id="auth_signup.login" inherit_id="web.login" name="Sign up - Reset Password"> |
| 4 | <xpath expr="//div[hasclass('oe_login_buttons')]/button" position="after"> |
| 5 | <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> |
| 6 | </xpath> |
| 7 | <xpath expr="//label[@for='password']" position="after"> |
| 8 | <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> |
| 9 | </xpath> |
| 10 | </template> |
| 11 | |
| 12 | <template id="auth_signup.fields" name="Auth Signup/ResetPassword form fields"> |
| 13 | <div class="mb-3 field-password pt-2 o_caps_lock_warning"> |
| 14 | <label for="password" class="form-label">Password</label> |
| 15 | <div class="input-group mb-1"> |
| 16 | <input type="password" name="password" id="password" class="form-control" |
| 17 | required="required" t-att-autofocus="'autofocus' if autofocus else None" placeholder="••••••••••"/> |
| 18 | <button type="button" class="btn btn-sm border border-start-0 o_show_password"> |
| 19 | <i class="fa fa-eye"/> |
| 20 | </button> |
| 21 | </div> |
| 22 | </div> |
| 23 | |
| 24 | <div class="mb-3 field-confirm_password"> |
| 25 | <label for="confirm_password" class="form-label">Confirm Password</label> |
| 26 | <div class="input-group mb-1"> |
| 27 | <input type="password" name="confirm_password" id="confirm_password" class="form-control" required="required" placeholder="••••••••••"/> |
| 28 | <button type="button" class="btn btn-sm border border-start-0 o_show_password"> |
| 29 | <i class="fa fa-eye"/> |
| 30 | </button> |
| 31 | </div> |
| 32 | </div> |
| 33 | </template> |
| 34 | |
| 35 | <template id="auth_signup.signup" name="Sign up login"> |
| 36 | <t t-call="web.login_layout"> |
| 37 | <div class="oe_structure" id="oe_structure_signup_top"/> |
| 38 | <form class="oe_signup_form" role="form" method="post" t-if="not message" data-captcha="signup"> |
| 39 | <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> |
| 40 | |
| 41 | <div class="mb-3 field-name"> |
| 42 | <label for="name" class="form-label">Name</label> |
| 43 | <input type="text" name="name" t-att-value="name" id="name" class="form-control" placeholder="John Doe" |
| 44 | autofocus="autofocus" required="required"/> |
| 45 | </div> |
| 46 | |
| 47 | <div class="mb-3 field-login"> |
| 48 | <label for="login" class="form-label">Email</label> |
| 49 | <input type="text" name="login" t-att-value="login" id="login" class="form-control" |
| 50 | t-att-autofocus="'autofocus' if login else None" |
| 51 | autocapitalize="off" required="required" placeholder="[email protected]"/> |
| 52 | </div> |
| 53 | |
| 54 | <t t-call="auth_signup.fields"/> |
| 55 | |
| 56 | <p class="alert alert-danger" t-if="error" role="alert"> |
| 57 | <t t-esc="error"/> |
| 58 | </p> |
| 59 | <input type="hidden" name="redirect" t-att-value="redirect"/> |
| 60 | <input type="hidden" name="token" t-att-value="token"/> |
| 61 | <div class="text-center oe_login_buttons d-grid pt-3"> |
| 62 | <button type="submit" class="btn btn-primary mb-1"> Sign up</button> |
| 63 | <a t-attf-href="/web/login?{{ keep_query() }}" class="btn btn-link btn-sm mt-2" role="button">Already have an account?</a> |
| 64 | <t t-call="web.login_oauth"/> |
| 65 | </div> |
| 66 | </form> |
| 67 | <div class="oe_structure" id="oe_structure_signup_bottom"/> |
| 68 | </t> |
| 69 | </template> |
| 70 | |
| 71 | <template id="auth_signup.reset_password" name="Reset password"> |
| 72 | <t t-call="web.login_layout"> |
| 73 | <div class="oe_structure" id="oe_structure_reset_password_top"/> |
| 74 | <div t-if="message" class="oe_login_form clearfix"> |
| 75 | <p class="alert alert-success" t-if="message" role="status"> |
| 76 | <t t-esc="message"/> |
| 77 | </p> |
| 78 | <a href="/web/login" class="btn btn-link btn-sm float-start" role="button">Back to Login</a> |
| 79 | </div> |
| 80 | |
| 81 | <form class="oe_reset_password_form" role="form" method="post" t-if="not message" data-captcha="password_reset"> |
| 82 | <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> |
| 83 | |
| 84 | <t t-if="token and not invalid_token"> |
| 85 | <t t-call="auth_signup.fields"> |
| 86 | <t t-set="autofocus" t-value="1"/> |
| 87 | </t> |
| 88 | </t> |
| 89 | |
| 90 | <t t-if="not token"> |
| 91 | <div class="mb-3 field-login"> |
| 92 | <label for="login" class="col-form-label">Email</label> |
| 93 | <input type="text" name="login" t-att-value="login" id="login" class="form-control" |
| 94 | autofocus="autofocus" required="required" autocapitalize="off"/> |
| 95 | </div> |
| 96 | </t> |
| 97 | |
| 98 | <p class="alert alert-danger" t-if="error" role="alert"> |
| 99 | <t t-esc="error"/> |
| 100 | </p> |
| 101 | <input type="hidden" name="redirect" t-att-value="redirect"/> |
| 102 | <input type="hidden" name="token" t-att-value="token"/> |
| 103 | <div class="clearfix oe_login_buttons d-grid mt-3"> |
| 104 | <button type="submit" class="btn btn-primary">Reset Password</button> |
| 105 | <div class="d-flex justify-content-between align-items-center small mt-2"> |
| 106 | <a t-if="not token" t-attf-href="/web/login?{{ keep_query() }}">Back to Login</a> |
| 107 | <a t-if="invalid_token" href="/web/login">Back to Login</a> |
| 108 | </div> |
| 109 | <t t-call="web.login_oauth"/> |
| 110 | </div> |
| 111 | |
| 112 | </form> |
| 113 | <div class="oe_structure" id="oe_structure_reset_password_bottom"/> |
| 114 | |
| 115 | </t> |
| 116 | </template> |
| 117 | </odoo> |