templates.xml 1.5 KB

1234567891011121314151617181920212223242526272829
  1. <odoo>
  2. <template id="auth_totp_mail_form" inherit_id="auth_totp.auth_totp_form">
  3. <xpath expr="//form/div[1]" position="attributes">
  4. <attribute name="t-if">user._mfa_type() == 'totp'</attribute>
  5. </xpath>
  6. <xpath expr="//form/div[1]" position="after">
  7. <div t-if="user._mfa_type() == 'totp_mail'" class="mb-2 mt-2 text-muted">
  8. <i class="fa fa-envelope-o"/>
  9. To login, enter below the six-digit authentication code just sent via email to <t t-out="user.email"/>.
  10. <br/>
  11. </div>
  12. </xpath>
  13. <xpath expr="//form[1]" position="after">
  14. <form method="POST" t-if="user._mfa_type() == 'totp_mail'">
  15. <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
  16. <input type="hidden" name="send_email" value="1"/>
  17. <button type="submit" class="btn btn-secondary btn-block">Re-send email</button>
  18. </form>
  19. </xpath>
  20. <xpath expr="//div[hasclass('border-top')]" position="before">
  21. <div class="mb-2" t-if="user._mfa_type() == 'totp_mail'">
  22. We strongly recommend enabling the two-factor authentication using an authenticator app to help secure your account.
  23. <br/>
  24. <a href="https://www.odoo.com/documentation/16.0/applications/general/auth/2fa.html" title="Learn More" target="_blank">Learn More</a>
  25. </div>
  26. </xpath>
  27. </template>
  28. </odoo>