diff options
author | Olivier Lamy <olamy@apache.org> | 2014-05-15 15:25:34 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-05-15 15:25:34 +1000 |
commit | 0a1a105b50801165b88eb030e9f97adecc0a8ebf (patch) | |
tree | bda90ceb5e82eafe62b75ec8c648ba98616a3080 | |
parent | 4c3ad4099c52eeab3d150df7b1df3d30d6caa0f3 (diff) | |
download | archiva-0a1a105b50801165b88eb030e9f97adecc0a8ebf.tar.gz archiva-0a1a105b50801165b88eb030e9f97adecc0a8ebf.zip |
[MRM-1841] "Remember me" not working
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 @@ <div class="modal-footer" id="modal-login-footer"> <div class="pull-left"> <label class="checkbox" id="user-login-form-rememberme-label"> - <input type="checkbox" id="user-login-form-rememberme">${$.i18n.prop('rememberme')} + <input type="checkbox" id="user-login-form-rememberme"/>${$.i18n.prop('rememberme')} </label> </div> <button class="btn btn-primary" id="modal-login-ok" data-loading-text="${$.i18n.prop('common.loading')}"> |