]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1841] "Remember me" not working
authorOlivier Lamy <olamy@apache.org>
Thu, 15 May 2014 05:25:34 +0000 (15:25 +1000)
committerOlivier Lamy <olamy@apache.org>
Thu, 15 May 2014 05:25:34 +0000 (15:25 +1000)
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/user.js
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/redback/login.html

index c92f10acce3e01d284bd7acfdd5e4d1360f36149..6472b68b25d6c0fd59edfa079d1ee4222747f30f 100644 (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;
   };
index 6c6a5438b1e32400f1104b280a8b3d58c6f47055..b40f5282ee26f6e9dfc99f9025b91d7777a0eba3 100644 (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();
 
index 0d8ff843b124f8dea210c8cd48601d2430814381..1f2aba12dbe2d4664845bf91ad86e104c31b97b4 100644 (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')}">