[MRM-1841] "Remember me" not working

This commit is contained in:
Olivier Lamy 2014-05-15 15:25:34 +10:00
parent 4c3ad4099c
commit 0a1a105b50
3 changed files with 7 additions and 3 deletions

View File

@ -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;
};

View File

@ -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();

View File

@ -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')}">