From 0a1a105b50801165b88eb030e9f97adecc0a8ebf Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 15 May 2014 15:25:34 +1000 Subject: [PATCH] [MRM-1841] "Remember me" not working --- .../archiva-webapp/src/main/webapp/js/archiva/main.js | 4 +++- .../archiva-webapp/src/main/webapp/js/redback/user.js | 4 +++- .../src/main/webapp/js/templates/redback/login.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js index c92f10acc..6472b68b2 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js @@ -22,7 +22,7 @@ define("archiva.main",["jquery","jquery.ui","sammy","jquery.tmpl",'i18n',"jquery function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryValidate,jqueryJson,ko,typeahead) { /** - * reccord a cookie for session with the logged user + * record a cookie for session with the logged user * @param user see user.js */ reccordLoginCookie=function(user) { @@ -69,6 +69,8 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa user.timestampAccountCreation,user.timestampLastLogin,user.timestampLastPasswordChange,user.locked, user.passwordChangeRequired,null,user.readOnly,user.userManagerId) + $.log("user.rememberme:"+user.rememberme); + kUser.rememberme(user.rememberme); return kUser; }; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/user.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/user.js index 6c6a5438b..b40f5282e 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/user.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/user.js @@ -429,6 +429,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) { } // FIXME check validated + $.log("window.redbackModel.rememberme:"+window.redbackModel.rememberme); user.rememberme(window.redbackModel.rememberme); if(user.rememberme()){ user.password(window.redbackModel.password); @@ -586,7 +587,8 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) { $('#modal-login-footer').append(smallSpinnerImg()); - var rememberme=($("#user-login-form-rememberme" ).attr('checked')=='checked'); + var rememberme=$('#user-login-form-rememberme').is(':checked'); + $.log("user.js#login, rememberme:"+rememberme); window.redbackModel.rememberme=rememberme; window.redbackModel.password=$("#user-login-form-password").val(); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/redback/login.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/redback/login.html index 0d8ff843b..1f2aba12d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/redback/login.html +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/redback/login.html @@ -48,7 +48,7 @@