Skip to content

Commit 67565e8

Browse files
committed
[FIX] auth_sms: template improvements
1 parent 20ce86c commit 67565e8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

auth_saml/views/auth_saml.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
</template>
2222
<template id="auth_saml.login" inherit_id="web.login" name="Samlv2 Login buttons">
2323
<xpath expr="//form" position="before">
24-
<t t-set="form_small" t-value="len(saml_providers) &gt; 2" />
24+
<t
25+
t-set="form_small"
26+
t-value="saml_providers and len(saml_providers) &gt; 2 or False"
27+
/>
2528
</xpath>
2629
<xpath expr="//div[hasclass('o_login_auth')]" position="inside">
2730
<t t-call="auth_saml.providers" />

auth_sms/templates/template_code.xml

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<attribute name="t-attf-action">/auth_sms/code</attribute>
66
<attribute name="onsubmit" />
77
</xpath>
8+
<!-- Remove database selector. -->
9+
<xpath expr="//label[@for='db']/parent::div" position="replace" />
810
<xpath expr="//form" position="inside">
911
<input type="hidden" name="secret" t-att-value="secret" />
1012
<input type="hidden" name="user_login" t-att-value="login" />
@@ -17,5 +19,8 @@
1719
<xpath expr="//label[@for='password']" position="replace">
1820
<label for="password" class="control-label">Code</label>
1921
</xpath>
22+
<xpath expr="//input[@name='password']" position="attributes">
23+
<attribute name="placeholder" />
24+
</xpath>
2025
</template>
2126
</odoo>

0 commit comments

Comments
 (0)