diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/auth_oauth/views/auth_oauth_templates.xml | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/auth_oauth/views/auth_oauth_templates.xml')
| -rw-r--r-- | addons/auth_oauth/views/auth_oauth_templates.xml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/addons/auth_oauth/views/auth_oauth_templates.xml b/addons/auth_oauth/views/auth_oauth_templates.xml new file mode 100644 index 00000000..529bd8f2 --- /dev/null +++ b/addons/auth_oauth/views/auth_oauth_templates.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <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="providers" name="OAuth Providers"> + <t t-if="len(providers) > 0"> + <em t-attf-class="d-block text-center text-muted small my-#{len(providers) if len(providers) < 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']"/> + <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" t-if="len(providers) > 2"/> + </xpath> + <xpath expr="//div[hasclass('o_login_auth')]" position="inside"> + <t t-call="auth_oauth.providers"/> + </xpath> + </template> + + <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="reset_password" inherit_id="auth_signup.reset_password" name="OAuth Reset Password buttons"> + <xpath expr="//div[hasclass('o_login_auth')]" position="inside"> + <t t-call="auth_oauth.providers"/> + </xpath> + </template> +</odoo> |
