Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
7470 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
mar 24
2217
4
dic 19
10742
4
feb 24
31261
0
ene 25
631
2
abr 24
4132