From d6b2e84afb97c6947b77f444df1cf7940f4c8046 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 9 Dec 2011 12:26:06 +0000 Subject: [PATCH] fix create admin git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1212368 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-webapp-js/src/main/webapp/js/redback/user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.39.5