コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7735 ビュー

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>
アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 24
2669
4
12月 19
11123
4
2月 24
32177
0
1月 25
915
2
4月 24
4608