Ctrl K
ComunidadGuías…

addons/auth_totp_mail/views/templates.xml

Rama 20.0 · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
<odoo>
    <template id="auth_totp_mail_form" inherit_id="auth_totp.auth_totp_form">
        <xpath expr="//form/div[1]" position="attributes">
            <attribute name="t-if">user._mfa_type() == 'totp'</attribute>
        </xpath>
        <xpath expr="//form/div[1]" position="after">
            <div t-if="user._mfa_type() == 'totp_mail'" class="mb-2 mt-2 text-muted">
                Check your inbox! We sent a code to <t t-out="user.email"/>.
                <br/>
            </div>
        </xpath>
        <xpath expr="//form[1]" position="after">
            <form method="POST" t-if="user._mfa_type() == 'totp_mail'">
                <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
                <input type="hidden" name="send_email" value="1"/>
                <button type="submit" class="btn btn-secondary w-100">Re-send email</button>
            </form>
        </xpath>
    </template>
</odoo>