auth_oauth_templates.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="providers" name="OAuth Providers">
  4. <t t-if="len(providers) &gt; 0">
  5. <em t-attf-class="d-block text-center text-muted small my-#{len(providers) if len(providers) &lt; 3 else 3}">- or -</em>
  6. <div class="o_auth_oauth_providers list-group mt-1 mb-1 text-start">
  7. <a t-foreach="providers" t-as="p" class="list-group-item list-group-item-action py-2" t-att-href="p['auth_link']">
  8. <i t-att-class="p['css_class']"/>
  9. <t t-esc="p['body']"/>
  10. </a>
  11. </div>
  12. </t>
  13. </template>
  14. <template id="login" inherit_id="web.login" name="OAuth Login buttons">
  15. <xpath expr="//form" position="before">
  16. <t t-set="form_small" t-value="True" t-if="len(providers) &gt; 2"/>
  17. </xpath>
  18. <xpath expr="//div[hasclass('o_login_auth')]" position="inside">
  19. <t t-call="auth_oauth.providers"/>
  20. </xpath>
  21. </template>
  22. <template id="signup" inherit_id="auth_signup.signup" name="OAuth Signup buttons">
  23. <xpath expr="//form" position="before">
  24. <t t-set="form_small" t-value="True"/>
  25. </xpath>
  26. <xpath expr="//div[hasclass('o_login_auth')]" position="inside">
  27. <t t-call="auth_oauth.providers"/>
  28. </xpath>
  29. </template>
  30. <template id="reset_password" inherit_id="auth_signup.reset_password" name="OAuth Reset Password buttons">
  31. <xpath expr="//div[hasclass('o_login_auth')]" position="inside">
  32. <t t-call="auth_oauth.providers"/>
  33. </xpath>
  34. </template>
  35. </odoo>