]> source.dussan.org Git - archiva.git/commitdiff
prevent js error when updating password
authorOlivier Lamy <olamy@apache.org>
Fri, 30 May 2014 06:28:15 +0000 (16:28 +1000)
committerOlivier Lamy <olamy@apache.org>
Fri, 30 May 2014 06:28:15 +0000 (16:28 +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

index 3fe2545f1623eed66ddbfbcbc81d0f0f0f74a511..87d8272c1561ef43180cb13240f1c221dea75474 100644 (file)
@@ -38,6 +38,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
     var kUser = new User(user.username, user.password, user.confirmPassword,user.fullName,user.email,user.permanent,user.validated,
                          user.timestampAccountCreation,user.timestampLastLogin,user.timestampLastPasswordChange,user.locked,
                          user.passwordChangeRequired,null,user.readOnly,user.userManagerId);
+
     kUser.rememberme(user.rememberme());
     var userJson=ko.toJSON(kUser);
     $.log("reccordLoginCookie:"+userJson);
index 039129c036168b1304b25c67ad02b9f0171a49d5..da16bf56e55bf65b586b8720488ad28d2add1808 100644 (file)
@@ -604,7 +604,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
       window.modalEditUserBox = $("#modal-user-edit").modal({backdrop:'static',show:false});
       window.modalEditUserBox.bind('hidden', function () {
         $("#modal-user-edit-err-message").hide();
-      })
+      });
       $("#modal-user-edit").find("#modal-user-edit-ok").on( "click keydown keypress", function(e) {
         e.preventDefault();
         $.log("user.js#editUserDetailsBox");
@@ -620,6 +620,10 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
           password:$("#modal-user-edit").find("#userEditFormNewPassword").val(),
           confirmPassword:$("#modal-user-edit").find("#userEditFormNewPasswordConfirm").val()
         };
+        var kuser =getUserFromLoginCookie();
+        user.rememberme=function(){
+          return kuser.rememberme();
+        }
         editUserDetails(user);
       });
     }