summaryrefslogtreecommitdiff
path: root/addons/auth_openid/static/src
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-08-16 00:58:56 +0200
committerAntony Lesuisse <al@openerp.com>2012-08-16 00:58:56 +0200
commit7125c97d6584a60129d0cf60f6ee72ce059f7e53 (patch)
tree08d35ee19ed788217d408ba4986c1585466a9e1d /addons/auth_openid/static/src
parent774ea74c389b62b7fe69035585a8f4308d35afd6 (diff)
parent21cfdfb988981be194f949e5a1e5deaf05b3c29b (diff)
[MERGE] sign up, openid, auth_oauth
bzr revid: al@openerp.com-20120815225856-j4um24esr5fjxvte
Diffstat (limited to 'addons/auth_openid/static/src')
-rw-r--r--addons/auth_openid/static/src/js/auth_openid.js16
-rw-r--r--addons/auth_openid/static/src/xml/auth_openid.xml23
2 files changed, 10 insertions, 29 deletions
diff --git a/addons/auth_openid/static/src/js/auth_openid.js b/addons/auth_openid/static/src/js/auth_openid.js
index fd6ec01cc0f..1417bc471ce 100644
--- a/addons/auth_openid/static/src/js/auth_openid.js
+++ b/addons/auth_openid/static/src/js/auth_openid.js
@@ -8,7 +8,7 @@ instance.web.Login = instance.web.Login.extend({
this._super.apply(this, arguments);
var self = this;
- this._default_error_message = this.$element.find('.login_error_message').text();
+ this._default_error_message = this.$element.find('.oe_login_error_message').text();
this.$openid_selected_button = $();
this.$openid_selected_input = $();
@@ -40,8 +40,7 @@ instance.web.Login = instance.web.Login.extend({
}
});
- this._check_fragment();
-
+ this._check_error();
},
@@ -67,11 +66,9 @@ instance.web.Login = instance.web.Login.extend({
},
- _check_fragment: function() {
+ _check_error: function() {
var self = this;
- var fragment = jQuery.deparam.fragment();
- console.log(fragment);
- if (fragment.loginerror !== undefined) {
+ if (this.params.loginerror !== undefined) {
this.rpc('/auth_openid/login/status', {}, function(result) {
if (_.contains(['success', 'failure'], result.status) && result.message) {
self.do_warn('Invalid OpenID Login', result.message);
@@ -132,11 +129,12 @@ instance.web.Login = instance.web.Login.extend({
do_warn: function(title, msg) {
//console.warn(title, msg);
- this.$element.find('.login_error_message').text(msg).show();
+ this.$element.find('.oe_login_error_message').text(msg).show();
+ this._super(title, msg);
},
reset_error_message: function() {
- this.$element.find('.login_error_message').text(this._default_error_message);
+ this.$element.find('.oe_login_error_message').text(this._default_error_message);
}
});
diff --git a/addons/auth_openid/static/src/xml/auth_openid.xml b/addons/auth_openid/static/src/xml/auth_openid.xml
index 34894555668..aa61d161657 100644
--- a/addons/auth_openid/static/src/xml/auth_openid.xml
+++ b/addons/auth_openid/static/src/xml/auth_openid.xml
@@ -3,7 +3,7 @@
<templates id="template" xml:space="preserve">
<t t-extend="Login">
- <t t-jquery=".login .pane div#logo" t-operation="after">
+ <t t-jquery=".oe_login .oe_login_logo" t-operation="after">
<ul class="openid_providers">
<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>
@@ -13,25 +13,8 @@
</ul>
</t>
</t>
-
- <t t-extend="Login">
- <t t-jquery=".oe_box2 tr:first" t-operation="after">
- <tr>
- <td><label for="googleapps">Google Apps Domain:</label></td>
- <td><input type="text" name="googleapps" /></td>
- </tr>
- <tr>
- <td><label for="launchpad">Username:</label></td>
- <td><input type="text" name="launchpad" /></td>
- </tr>
- <tr>
- <td><label for="openid_url">OpenID URL:</label></td>
- <td><input type="text" name="openid_url" /></td>
- </tr>
- </t>
- </t>
<t t-extend="Login">
- <t t-jquery=".login .pane form ul li:nth-child(4)" t-operation="after">
+ <t t-jquery=".oe_login .oe_login_pane form ul li:nth-child(4)" t-operation="after">
<li>
Google Apps Domain
</li>
@@ -54,7 +37,7 @@
</t>
<t t-extend="Login">
- <t t-jquery=".login .pane form ul li:has(input)">
+ <t t-jquery=".oe_login .oe_login_pane form ul li:has(input)">
this.each(function() {
var $i = $(this),
dp = $i.find('input').attr('name');