summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/views
diff options
context:
space:
mode:
authorsri-odoo <sri@odoo.com>2018-09-10 15:06:28 +0200
committerqsm-odoo <qsm@odoo.com>2018-09-17 12:04:23 +0200
commitb78b9c87c95acdf6fcf4f4eb3a80efa0e90eae09 (patch)
tree9a8a0247cfa73f1d86286fbcc2197de3e38bc6be /addons/auth_oauth/views
parent4e85ca8a76dc2be4da805fd0aa83ef5227ce44ab (diff)
[REF] web, *: redesign login screens
* auth_signup, auth_oauth
Diffstat (limited to 'addons/auth_oauth/views')
-rw-r--r--addons/auth_oauth/views/auth_oauth_templates.xml54
1 files changed, 33 insertions, 21 deletions
diff --git a/addons/auth_oauth/views/auth_oauth_templates.xml b/addons/auth_oauth/views/auth_oauth_templates.xml
index bdc5cf4f244..37fb23ecdd3 100644
--- a/addons/auth_oauth/views/auth_oauth_templates.xml
+++ b/addons/auth_oauth/views/auth_oauth_templates.xml
@@ -1,35 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
- <template id="auth_oauth.providers" name="OAuth Providers">
- <div t-foreach="providers" t-as="p">
- <a t-att-href="p['auth_link']" class="btn btn-link" role="button">
- <i t-att-class="p['css_class']"/>
- <t t-esc="p['body']"/>
- </a>
- </div>
+ <template id="assets_frontend" inherit_id="web.assets_frontend" name="OAuth Providers Assets">
+ <xpath expr="//link[last()]" position="after">
+ <link rel="stylesheet" type="text/scss" href="/auth_oauth/static/src/scss/auth_oauth.scss"/>
+ </xpath>
</template>
- <template id="auth_oauth.login" inherit_id="web.login" name="OAuth Login buttons">
- <xpath expr="//button[@type='submit']" position="before">
- <div class="float-right">
- <t t-call="auth_oauth.providers"/>
+ <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>
+ <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']"/>
+ <t t-esc="p['body']"/>
+ </a>
</div>
+ </t>
+ </template>
+
+ <template id="login" inherit_id="web.login" name="OAuth Login 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>
</template>
- <template id="auth_oauth.signup" inherit_id="auth_signup.signup" name="OAuth Signup buttons">
- <xpath expr="//button[@type='submit']" position="before">
- <div class="float-right">
- <t t-call="auth_oauth.providers"/>
- </div>
+ <template id="signup" inherit_id="auth_signup.signup" name="OAuth Signup 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>
</template>
- <template id="auth_oauth.reset_password" inherit_id="auth_signup.reset_password" name="OAuth Reset Password buttons">
- <xpath expr="//button[@type='submit']" position="before">
- <div class="float-right">
- <t t-call="auth_oauth.providers"/>
- </div>
+ <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>
</template>
</odoo>