summaryrefslogtreecommitdiff
path: root/addons/auth_openid/static/src/xml
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2013-03-14 12:09:27 +0100
committerChristophe Simonis <chs@openerp.com>2013-03-14 12:09:27 +0100
commitd5ec6fdcb5daff56791131c587ac03613e0c2a7b (patch)
tree43842ec687e7b2050ef2ae53378268e6d16a32f3 /addons/auth_openid/static/src/xml
parentae28294289cd2807008266e27392c3388c74ef5d (diff)
[FIX] auth_openid: add data-modes attribute on <li> tags to be compatible with auth_signup module.
show()/hide() elements explicitly instead of setting a specific class for this job. bzr revid: chs@openerp.com-20130314110927-rvb21ii1lbfpmmna
Diffstat (limited to 'addons/auth_openid/static/src/xml')
-rw-r--r--addons/auth_openid/static/src/xml/auth_openid.xml31
1 files changed, 20 insertions, 11 deletions
diff --git a/addons/auth_openid/static/src/xml/auth_openid.xml b/addons/auth_openid/static/src/xml/auth_openid.xml
index 6a40439a012..9802b8adda5 100644
--- a/addons/auth_openid/static/src/xml/auth_openid.xml
+++ b/addons/auth_openid/static/src/xml/auth_openid.xml
@@ -4,7 +4,7 @@
<t t-extend="Login">
<t t-jquery=".oe_login .oe_login_logo" t-operation="after">
- <ul class="openid_providers oe_semantic_html_override">
+ <ul class="openid_providers oe_semantic_html_override" data-modes="default openid">
<li><a href="#login,password" title="Password" data-url="" id="btn_password">Password</a></li>
<li><a href="#google" title="Google" data-url="https://www.google.com/accounts/o8/id">Google</a></li>
<li><a href="#googleapps" title="Google Apps" data-url="https://www.google.com/accounts/o8/site-xrds?hd={id}">Google</a></li>
@@ -14,34 +14,43 @@
</t>
</t>
<t t-extend="Login">
- <t t-jquery=".oe_login .oe_login_pane form ul li:nth-child(4)" t-operation="after">
- <li>
+ <t t-jquery=".oe_login .oe_login_pane form ul li:last-child()" t-operation="before">
+ <li data-modes="openid" data-provider='googleapps'>
Google Apps Domain
</li>
- <li>
+ <li data-modes="openid" data-provider='googleapps'>
<input type="text" name="googleapps" />
</li>
- <li>
+ <li data-modes="openid" data-provider='launchpad'>
Username
</li>
- <li>
+ <li data-modes="openid" data-provider='launchpad'>
<input type="text" name="launchpad" />
</li>
- <li>
+ <li data-modes="openid" data-provider='openid_url'>
OpenID URL
</li>
- <li>
+ <li data-modes="openid" data-provider='openid_url'>
<input type="text" name="openid_url" />
</li>
</t>
</t>
<t t-extend="Login">
- <t t-jquery=".oe_login .oe_login_pane form ul li:has(input)">
+ <t t-jquery=".oe_login .oe_login_pane form ul li:has(input[name=password])">
+ this.each(function() {
+ var $i = $(this);
+ $i.add($i.prev()).attr('data-provider', 'password');
+ });
+ </t>
+ <t t-jquery=".oe_login .oe_login_pane form ul li:has(input[name=login])">
this.each(function() {
var $i = $(this),
- dp = $i.find('input').attr('name');
- $i.add($i.prev()).attr('class', 'auth_choice').attr('data-provider', dp);
+ dp = $i.find('input').attr('name'),
+ $p = $i.prev();
+ // $p may not be the correct label when auth_signup is installed.
+ while(($p.attr('data-modes') || 'default') !== 'default') { $p = $p.prev(); }
+ $i.add($p).attr('data-provider', dp);
});
</t>
</t>