]> source.dussan.org Git - archiva.git/commitdiff
fix create admin
authorOlivier Lamy <olamy@apache.org>
Fri, 9 Dec 2011 12:26:06 +0000 (12:26 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 9 Dec 2011 12:26:06 +0000 (12:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1212368 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js

index 1f3bd0cfe47b0cb17983ce2aac89075e11cdaf41..6830a1b74837824259d803b95bdec396a9dc736d 100644 (file)
@@ -72,6 +72,7 @@ $(function() {
 
       this.createAdmin = function() {
         var valid = $("#user-create").valid();
+        $.log("create admin");
         if (!valid) {
             return;
         }
@@ -151,8 +152,9 @@ $(function() {
       }
 
       this.save=function(){
+        $.log("user.save create:"+window.redbackModel.createUser);
         if (window.redbackModel.createUser==true){
-          return this.createUser();
+          return this.create();
         } else {
           return this.update();
         }
@@ -163,10 +165,11 @@ $(function() {
 
 
   adminUserViewModel=function() {
-    this.user = new user("admin");
+    this.user = new user("admin","aze123","aze123", "the admin");
   }
 
   adminCreateBox=function() {
+    window.redbackModel.createUser=true;
     jQuery("#main-content").attr("data-bind",'template: {name:"redback/user-edit-tmpl",data: user}');
     var viewModel = new adminUserViewModel();
     ko.applyBindings(viewModel);