summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/views/auth_oauth_templates.xml
diff options
context:
space:
mode:
authorsri-odoo <sri@odoo.com>2018-09-18 11:58:01 +0200
committerJeremy Kersten <jke@odoo.com>2018-09-21 13:24:03 +0200
commit63e54c2c71f393cb77a929aff8172002e4400a51 (patch)
treed3f8b27fc554ca3994bb80aa716e369750a79e62 /addons/auth_oauth/views/auth_oauth_templates.xml
parent0f04b64544a1439f0035c7b68f1fdb9bf1c6cd99 (diff)
[REF] auth_oauth: Login screen adjustments
Dinamically adjust margins and form size according to auth methods available. The vertical margin on the "- or -" text it's needed to provide visual separation between default and auth logins, but it shuldn't be huge in case of just 1 or 2 methods. This commit closes #27059
Diffstat (limited to 'addons/auth_oauth/views/auth_oauth_templates.xml')
-rw-r--r--addons/auth_oauth/views/auth_oauth_templates.xml7
1 files changed, 2 insertions, 5 deletions
diff --git a/addons/auth_oauth/views/auth_oauth_templates.xml b/addons/auth_oauth/views/auth_oauth_templates.xml
index 37fb23ecdd3..529bd8f27ce 100644
--- a/addons/auth_oauth/views/auth_oauth_templates.xml
+++ b/addons/auth_oauth/views/auth_oauth_templates.xml
@@ -8,7 +8,7 @@
<template id="providers" name="OAuth Providers">
<t t-if="len(providers) &gt; 0">
- <em class="d-block text-center text-muted small my-3">- or -</em>
+ <em t-attf-class="d-block text-center text-muted small my-#{len(providers) if len(providers) &lt; 3 else 3}">- or -</em>
<div class="o_auth_oauth_providers list-group mt-1 mb-1 text-left">
<a t-foreach="providers" t-as="p" class="list-group-item list-group-item-action py-2" t-att-href="p['auth_link']">
<i t-att-class="p['css_class']"/>
@@ -20,7 +20,7 @@
<template id="login" inherit_id="web.login" name="OAuth Login buttons">
<xpath expr="//form" position="before">
- <t t-set="form_small" t-value="True"/>
+ <t t-set="form_small" t-value="True" t-if="len(providers) &gt; 2"/>
</xpath>
<xpath expr="//div[hasclass('o_login_auth')]" position="inside">
<t t-call="auth_oauth.providers"/>
@@ -37,9 +37,6 @@
</template>
<template id="reset_password" inherit_id="auth_signup.reset_password" name="OAuth Reset Password buttons">
- <xpath expr="//form" position="before">
- <t t-set="form_small" t-value="True"/>
- </xpath>
<xpath expr="//div[hasclass('o_login_auth')]" position="inside">
<t t-call="auth_oauth.providers"/>
</xpath>