Skip to content

Commit

Permalink
[FIX] auth_sms: template improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
NL66278 committed Jan 17, 2025
1 parent 20ce86c commit 67565e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion auth_saml/views/auth_saml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
</template>
<template id="auth_saml.login" inherit_id="web.login" name="Samlv2 Login buttons">
<xpath expr="//form" position="before">
<t t-set="form_small" t-value="len(saml_providers) &gt; 2" />
<t
t-set="form_small"
t-value="saml_providers and len(saml_providers) &gt; 2 or False"
/>
</xpath>
<xpath expr="//div[hasclass('o_login_auth')]" position="inside">
<t t-call="auth_saml.providers" />
Expand Down
5 changes: 5 additions & 0 deletions auth_sms/templates/template_code.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<attribute name="t-attf-action">/auth_sms/code</attribute>
<attribute name="onsubmit" />
</xpath>
<!-- Remove database selector. -->
<xpath expr="//label[@for='db']/parent::div" position="replace" />
<xpath expr="//form" position="inside">
<input type="hidden" name="secret" t-att-value="secret" />
<input type="hidden" name="user_login" t-att-value="login" />
Expand All @@ -17,5 +19,8 @@
<xpath expr="//label[@for='password']" position="replace">
<label for="password" class="control-label">Code</label>
</xpath>
<xpath expr="//input[@name='password']" position="attributes">
<attribute name="placeholder" />
</xpath>
</template>
</odoo>

0 comments on commit 67565e8

Please sign in to comment.