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.
 
 
 
 
 

146 lines
6.9 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Inherit the signup template to add the mobile number signup link-->
<template id="signup_with_mobile_link" inherit_id="auth_signup.signup"
name="Signup with mobile link">
<xpath expr="//button[@type='submit']" position="after">
<div class="justify-content-between mt-2 d-flex small signup-link">
<a class="sign-up-mobile" style="font-size: 12px;"
t-attf-href="/web/signup-mobile?{{ keep_query() }}">SignUp
With Mobile
</a>
</div>
</xpath>
</template>
<!-- Template for signup with mobile -->
<template id="signup_with_mobile_fields"
name="Auth Signup with mobile form fields">
<div class="mb-3 field-login-mobile">
<label for="login_mobile">Mobile Numer</label>
<div class="country-and-mobile-number">
<div class="mb-1 field-phone col-lg-3" id="country_code">
<select class="div_code" name="country_code"
style="background-color: white">
<option value=""/>
<option t-foreach="request.env['res.country'].sudo().search([])"
t-as="country"
t-att-value="country.phone_code">
<span>+</span>
<t t-esc="country.phone_code"/>
</option>
</select>
</div>
<div class="mb-1 field-phone col-lg-9" id="div_number">
<input type="text" name="login_mobile"
t-att-value="login_mobile"
class="login_mobile form-control form-control-sm"
autofocus="autofocus" autocapitalize="off"
required="required"
t-att-readonly="'readonly' if only_passwords else None"/>
</div>
</div>
</div>
<div class="otp-verification">
<label for="otp_verify">OTP Verification</label>
<div class="mb-3 otp_verify"
style="display: flex; flex-direction: row;">
<div class="mb-1 sms-validate col-lg-6">
<input type="text" name="sms_otp" t-att-value="sms_otp"
id="sms_otp_verify"
class="form-control" autofocus="autofocus"
required="required"
style="height: 32px; margin-right:5px;"/>
</div>
<button name="sent_otp_sms"
style="height: 32px; margin-left:5px; border-radius: 20px; padding-bottom: 27px"
class="btn btn-primary sent-otp col-lg-6"
role="button">Sent OTP
</button>
</div>
</div>
<div class="mb-3 field-name">
<label for="name">Your Name</label>
<input type="text" name="name" t-att-value="name" id="name"
class="form-control form-control-sm"
placeholder="e.g. John Doe"
required="required"
t-att-readonly="'readonly' if only_passwords else None"
t-att-autofocus="'autofocus' if login and not only_passwords else None"/>
</div>
<div class="mb-3 field-password pt-2">
<label for="password">Password</label>
<input type="password" name="password" id="password"
class="form-control form-control-sm"
required="required"
t-att-autofocus="'autofocus' if only_passwords else None"/>
</div>
<div class="mb-3 field-confirm_password">
<label for="confirm_password">Confirm Password</label>
<input type="password" name="confirm_password"
id="confirm_password"
class="form-control form-control-sm"
required="required"/>
</div>
</template>
<!-- Template for signup with mobile -->
<template id="signup_mobile" name="Sign up login">
<t t-call="web.login_layout">
<form class="oe_signup_form_mobile" role="form" method="post"
t-if="not message">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<t t-call="signup_with_twilio.signup_with_mobile_fields">
<t t-set="only_passwords"
t-value="bool(token and not invalid_token)"/>
</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"/>
<input type="hidden" name="signup_mobile" t-att-value="True"/>
<div class="text-center oe_login_buttons d-grid pt-3">
<button type="submit" class="btn btn-primary sign-up">Sign
up
</button>
<a t-attf-href="/web/login?{{ keep_query() }}"
class="btn btn-link btn-sm" role="button">Already have an
account?
</a>
<div class="o_login_auth"/>
</div>
</form>
</t>
</template>
<!-- Inherit the reset password template to add the mobile number-->
<template id="sign_up_mobile_reset_password"
inherit_id="auth_signup.reset_password"
name="Reset password">
<xpath expr="//div[@class='mb-3 field-login']/label"
position="replace">
<label for="login" class="col-form-label">Login Email/Mobile
Number
</label>
</xpath>
<xpath expr="//form[@class='oe_reset_password_form']/t[2]"
position="after">
<div class="check-login">
<input type="checkbox" name="check-login" class="check_login">
<span>Mail as same as login</span>
</input>
</div>
<t t-if="not token">
<div class="mb-3 field-email">
<label for="login_mail" class="col-form-label">Mail to send
Password
</label>
<input type="text" name="login-mail"
t-att-value="login_mail"
id="login_mail" class="form-control"
autofocus="autofocus" required="required"
autocapitalize="off"/>
</div>
</t>
</xpath>
</template>
</odoo>