Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7539 Представления

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..

Аватар
Отменить
Лучший ответ

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>
Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
мар. 24
2291
4
дек. 19
10821
4
февр. 24
31369
0
янв. 25
647
2
апр. 24
4231