Skip to Content
Menu
This question has been flagged
1 Reply
6667 Views

Hello All,

i am trying to extend a template using t-jquery but it is not working.

Main template:

<template id="auth_signup.login" inherit_id="web.login" name="Sign up - Reset Password">

            <xpath expr="//button[@type='submit']" position="before">

                <a t-if="signup_enabled" t-attf-href="/web/signup?{{ keep_query() }}" class="btn btn-link pull-right">Don't have an account?</a>

                <a t-if="reset_password_enabled" t-attf-href="/web/reset_password?{{ keep_query() }}" class="btn btn-link pull-right">Reset Password</a>

            </xpath>

        </template>


In that i want to change this field: 

<a t-if="signup_enabled" t-attf-href="/web/signup?{{ keep_query() }}" class="btn btn-link pull-right">Don't have an account?</a>

to:

<a t-if="signup_enabled" t-attf-href="/custom_signup" class="btn btn-link pull-right">Don't have an account?</a>

Thanks in advance..

Avatar
Discard
Best Answer

Try this

<template id="login_inherited" inherit_id="auth_signup.login" name="Sign up - Reset Password">
<t t-jquery="a[t-attf-href='/web/signup?{{ keep_query() }}']" t-operation="replace">
<a t-if="signup_enabled" t-attf-href="/custom_signup" class="btn btn-link pull-right">Don't have an account?</a>
</t>
</template>
Avatar
Discard
Related Posts Replies Views Activity
2
Mar 24
911
4
Dec 19
9654
4
Feb 24
27927
0
Oct 24
2
2
Apr 24
2488