[FIX] auth_signup + auth_anonymous: update to new api
authorChristophe Simonis <chs@openerp.com>
Wed, 14 Nov 2012 16:54:46 +0000 (17:54 +0100)
committerChristophe Simonis <chs@openerp.com>
Wed, 14 Nov 2012 16:54:46 +0000 (17:54 +0100)
bzr revid: chs@openerp.com-20121114165446-7f4xv1yb11pu50ya

addons/auth_anonymous/static/src/js/auth_anonymous.js
addons/auth_signup/static/src/js/auth_signup.js

index 8a78aca..6768bc6 100644 (file)
@@ -4,11 +4,11 @@ openerp.auth_anonymous = function(instance) {
         start: function() {
             var self = this;
             return $.when(this._super()).then(function() {
-                var dblist = self._db_list || [];
+                var dblist = self.db_list || [];
                 if (!self.session.session_is_valid() && dblist.length === 1) {
                     self.remember_credentials = false;
                     // XXX get login/pass from server (via a rpc call) ?
-                    return self.do_login(dblist[0], 'anonymous', 'anonymous')
+                    return self.do_login(dblist[0], 'anonymous', 'anonymous');
                 }
 
             });
index bb24942..3025069 100644 (file)
@@ -41,7 +41,7 @@ openerp.auth_signup = function(instance) {
         on_token_loaded: function(result) {
             // select the right the database
             this.selected_db = result.db;
-            this.on_db_loaded({db_list: [result.db]});
+            this.on_db_loaded([result.db]);
             if (result.token) {
                 // switch to signup mode, set user name and login
                 this.$el.addClass("oe_login_signup");
@@ -80,16 +80,16 @@ openerp.auth_signup = function(instance) {
                     this.do_warn("Login", "No database selected !");
                     return false;
                 } else if (!name) {
-                    this.do_warn("Login", "Please enter a name.")
+                    this.do_warn("Login", "Please enter a name.");
                     return false;
                 } else if (!login) {
-                    this.do_warn("Login", "Please enter a username.")
+                    this.do_warn("Login", "Please enter a username.");
                     return false;
                 } else if (!password || !confirm_password) {
-                    this.do_warn("Login", "Please enter a password and confirm it.")
+                    this.do_warn("Login", "Please enter a password and confirm it.");
                     return false;
                 } else if (password !== confirm_password) {
-                    this.do_warn("Login", "Passwords do not match; please retype them.")
+                    this.do_warn("Login", "Passwords do not match; please retype them.");
                     return false;
                 }
                 var params = {