diff options
| author | Atul Patel (OpenERP) <atp@tinyerp.com> | 2012-08-16 10:50:21 +0530 |
|---|---|---|
| committer | Atul Patel (OpenERP) <atp@tinyerp.com> | 2012-08-16 10:50:21 +0530 |
| commit | 22a810507cc6b4e48a067b6baaf9869d72e5a38e (patch) | |
| tree | 1808e0671b83dec971ae431b6ab1f09cfbfb44e8 /addons/auth_openid/static/src | |
| parent | 1d2168a02ebeeb7441c9171bd9dcda8226d29cdc (diff) | |
| parent | f4f7de136921528f4b465629ff756b367ee0bba7 (diff) | |
[MERGE]: Merged with lp:openobject-addons
bzr revid: atp@tinyerp.com-20120816052021-igdj7knaimwg9x7z
Diffstat (limited to 'addons/auth_openid/static/src')
| -rw-r--r-- | addons/auth_openid/static/src/js/auth_openid.js | 16 | ||||
| -rw-r--r-- | addons/auth_openid/static/src/xml/auth_openid.xml | 23 |
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'); |
