Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
7738 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
mar. 24
2683
4
dez. 19
11143
4
fev. 24
32189
0
jan. 25
916
2
abr. 24
4609