From 938c0ac92baaeabb4593c3ba4ba9b4521b4fa5cd Mon Sep 17 00:00:00 2001 From: Jesse McConnell Date: Tue, 12 Sep 2006 19:44:24 +0000 Subject: [PATCH] reworked login and register so flow is improved and its functional! git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@442680 13f79535-47bb-0310-9956-ffa450edef68 --- .../web/action/admin/NewUserAction.java | 7 +- archiva-webapp/src/main/resources/xwork.xml | 7 +- .../webapp/WEB-INF/jsp/decorators/default.jsp | 3 +- .../src/main/webapp/WEB-INF/jsp/login.jsp | 79 +++++++++++++++++++ .../jsp/{loginRegister.jsp => register.jsp} | 45 +---------- .../src/main/webapp/WEB-INF/jsp/user.jsp | 30 ++++--- 6 files changed, 114 insertions(+), 57 deletions(-) create mode 100644 archiva-webapp/src/main/webapp/WEB-INF/jsp/login.jsp rename archiva-webapp/src/main/webapp/WEB-INF/jsp/{loginRegister.jsp => register.jsp} (68%) diff --git a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/NewUserAction.java b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/NewUserAction.java index c3baf970c..a3d078734 100644 --- a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/NewUserAction.java +++ b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/NewUserAction.java @@ -63,6 +63,11 @@ public class NewUserAction public String createUser() { + if ( username == null ) + { + return INPUT; + } + // TODO: use commons-validator for these fields. if ( StringUtils.isEmpty( username ) ) @@ -120,7 +125,7 @@ public class NewUserAction if ( hasActionErrors() ) { - return ERROR; + return INPUT; } return SUCCESS; diff --git a/archiva-webapp/src/main/resources/xwork.xml b/archiva-webapp/src/main/resources/xwork.xml index 4b900e04f..e40206cba 100644 --- a/archiva-webapp/src/main/resources/xwork.xml +++ b/archiva-webapp/src/main/resources/xwork.xml @@ -127,7 +127,8 @@ - /WEB-INF/jsp/loginRegister.jsp + /WEB-INF/jsp/login.jsp + /WEB-INF/jsp/login.jsp browse @@ -136,7 +137,9 @@ - login + /WEB-INF/jsp/register.jsp + /WEB-INF/jsp/register.jsp + /WEB-INF/jsp/register.jsp diff --git a/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp b/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp index 0260c3619..b7909d252 100644 --- a/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp +++ b/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp @@ -60,9 +60,10 @@