From: Olivier Lamy Date: Fri, 9 Dec 2011 12:26:06 +0000 (+0000) Subject: fix create admin X-Git-Tag: archiva-1.4-M2~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d6b2e84afb97c6947b77f444df1cf7940f4c8046;p=archiva.git fix create admin git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1212368 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js index 1f3bd0cfe..6830a1b74 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js @@ -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);