Commit 30e7d759 authored by Bill Lynch's avatar Bill Lynch Committed by bill

UI cleanup - no new features yet


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@726 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1ed742a7
...@@ -108,54 +108,57 @@ ...@@ -108,54 +108,57 @@
<p>Use the form below to create a new group.</p> <p>Use the form below to create a new group.</p>
<form name="f" action="group-create.jsp" method="post"> <form name="f" action="group-create.jsp" method="post">
<fieldset> <fieldset>
<legend>Create New Group</legend> <legend>Create New Group</legend>
<div> <div>
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600"> <table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr valign="middle" class="jive-even"> <tr valign="top">
<td> <td width="1%" nowrap>
Group Name: * <label for="gname">Group Name:</label> *
</td> </td>
<td> <td width="99%">
<input type="text" name="name" size="30" maxlength="75" <input type="text" name="name" size="30" maxlength="75" value="<%= ((name!=null) ? name : "") %>"
value="<%= ((name!=null) ? name : "") %>"> id="gname">
<% if (errors.get("name") != null) { %> <% if (errors.get("name") != null) { %>
<span class="jive-error-text"> <span class="jive-error-text">
Invalid name. Invalid name.
</span> </span>
<% } else if (errors.get("groupAlreadyExists") != null) { %> <% } else if (errors.get("groupAlreadyExists") != null) { %>
<span class="jive-error-text"> <span class="jive-error-text">
Group already exists - please choose a different name. Group already exists - please choose a different name.
</span> </span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<tr valign="middle" class="jive-odd"> <tr valign="top">
<td> <td width="1%" nowrap>
Description: <label for="gdesc">Description:</label>
</td> </td>
<td> <td width="99%">
<input type="text" name="description" size="30" maxlength="75" <textarea name="description" cols="30" rows="5" id="gdesc"
value="<%= ((description!=null) ? description : "") %>"> ><%= ((description!=null) ? description : "") %></textarea>
<% if (errors.get("description") != null) { %> <% if (errors.get("description") != null) { %>
<span class="jive-error-text"> <span class="jive-error-text">
Invalid description. Invalid description.
</span> </span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
</table> </table>
<br> <br>
* Required fields <span class="jive-description">
</div> * Required fields
</span>
</div>
</fieldset> </fieldset>
<br><br> <br><br>
......
...@@ -123,12 +123,12 @@ Below is a summary of the group. To edit properties, click the "Edit" button bel ...@@ -123,12 +123,12 @@ Below is a summary of the group. To edit properties, click the "Edit" button bel
Description: Description:
</td> </td>
<td> <td>
<% if (group.getDescription() == null) { %> <% if (group.getDescription() == null || "".equals(group.getDescription().trim())) { %>
<span style="color:#999">
&nbsp; <i>Not set.</i>
</span>
<% } else { %> <% } else { %>
<%= group.getDescription() %> <%= group.getDescription() %>
<% } %> <% } %>
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
<jsp:include page="title.jsp" flush="true" /> <jsp:include page="title.jsp" flush="true" />
<% // Get parameters <% // Get parameters
try {
int start = ParamUtils.getIntParameter(request,"start",0); int start = ParamUtils.getIntParameter(request,"start",0);
int range = ParamUtils.getIntParameter(request,"range",15); int range = ParamUtils.getIntParameter(request,"range",15);
...@@ -180,6 +179,4 @@ Total Groups: <%= webManager.getGroupManager().getGroupCount() %>, ...@@ -180,6 +179,4 @@ Total Groups: <%= webManager.getGroupManager().getGroupCount() %>,
<% } %> <% } %>
<% } catch (Exception e) { e.printStackTrace(); } %>
<jsp:include page="bottom.jsp" flush="true" /> <jsp:include page="bottom.jsp" flush="true" />
...@@ -111,7 +111,7 @@ Administrator Account ...@@ -111,7 +111,7 @@ Administrator Account
</p> </p>
<p> <p>
Enter settings for the system administrator account below. It is important choose a password for the Enter settings for the system administrator account below. It is important to choose a password for the
account that cannot be easily guessed -- for example, at least six characters long and containing a account that cannot be easily guessed -- for example, at least six characters long and containing a
mix of letters and numbers. You can skip this step if you have already setup your admin mix of letters and numbers. You can skip this step if you have already setup your admin
account (not for first time users). account (not for first time users).
......
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%-- <%--
- $RCSfile$ - $RCSfile$
- $Revision$ - $Revision$
...@@ -9,6 +8,7 @@ ...@@ -9,6 +8,7 @@
- This software is published under the terms of the GNU Public License (GPL), - This software is published under the terms of the GNU Public License (GPL),
- a copy of which is included in this distribution. - a copy of which is included in this distribution.
--%> --%>
<%@ page import="org.jivesoftware.util.*, <%@ page import="org.jivesoftware.util.*,
java.util.HashMap, java.util.HashMap,
java.util.Map, java.util.Map,
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
<% webManager.init(request, response, session, application, out ); %> <% webManager.init(request, response, session, application, out ); %>
<% // Get parameters // <% // Get parameters //
boolean create = request.getParameter("create") != null; boolean another = request.getParameter("another") != null;
boolean create = another || request.getParameter("create") != null;
boolean cancel = request.getParameter("cancel") != null; boolean cancel = request.getParameter("cancel") != null;
String username = ParamUtils.getParameter(request,"username"); String username = ParamUtils.getParameter(request,"username");
String name = ParamUtils.getParameter(request,"name"); String name = ParamUtils.getParameter(request,"name");
...@@ -70,7 +71,12 @@ ...@@ -70,7 +71,12 @@
User newUser = webManager.getUserManager().createUser(username, password, name, email); User newUser = webManager.getUserManager().createUser(username, password, name, email);
// Successful, so redirect // Successful, so redirect
response.sendRedirect("user-properties.jsp?success=true&username=" + newUser.getUsername()); if (another) {
response.sendRedirect("user-create.jsp?success=true");
}
else {
response.sendRedirect("user-properties.jsp?success=true&username=" + newUser.getUsername());
}
return; return;
} }
catch (UserAlreadyExistsException e) { catch (UserAlreadyExistsException e) {
...@@ -85,6 +91,7 @@ ...@@ -85,6 +91,7 @@
} }
} }
%> %>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean"/> <jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean"/>
<% // Title of this page and breadcrumbs <% // Title of this page and breadcrumbs
String title = "Create User"; String title = "Create User";
...@@ -95,88 +102,128 @@ ...@@ -95,88 +102,128 @@
%> %>
<jsp:include page="top.jsp" flush="true"/> <jsp:include page="top.jsp" flush="true"/>
<jsp:include page="title.jsp" flush="true"/> <jsp:include page="title.jsp" flush="true"/>
<p>Use the form below to create a new user.</p>
<c:set var="submit" value="${param.create}"/> <c:set var="submit" value="${param.create}"/>
<c:set var="errors" value="${errors}"/> <c:set var="errors" value="${errors}"/>
<% if (errors.get("general") != null) { %>
<div class="jive-success"> <% if (errors.get("general") != null) { %>
<table cellpadding="0" cellspacing="0" border="0">
<div class="jive-error">
<table cellpadding="0" cellspacing="0" border="0">
<tbody> <tbody>
<tr> <tr>
<td class="jive-icon"> <td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16" border="0"/></td>
<img src="images/success-16x16.gif" width="16" height="16" border="0"/> <td class="jive-icon-label">Error creating the user account. Please check your error logs.</td>
</td> </tr>
<td class="jive-icon-label">Error creating the user account. Please check your error logs.</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<br/> <br>
<% } %>
<% } else if (request.getParameter("success") != null) { %>
<div class="jive-success">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0"></td>
<td class="jive-icon-label">
New user created successfully.
</td></tr>
</tbody>
</table>
</div><br>
<% } %>
<form name="f" action="user-create.jsp" method="post"> <form name="f" action="user-create.jsp" method="post">
<fieldset><legend>Create New User</legend>
<table cellpadding="3" cellspacing="1" border="0">
<tr><td class="c1">* Required fields</td></tr> <fieldset>
<legend>Create New User</legend>
<div>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr> <tr>
<td width="1%" class="c1">Username: *</td> <td width="1%" nowrap><label for="usernametf">Username:</label> *</td>
<td class="c2"> <td width="99%">
<input type="text" name="username" size="30" maxlength="75" value="<%= ((username!=null) ? username : "") %>"/> <input type="text" name="username" size="30" maxlength="75" value="<%= ((username!=null) ? username : "") %>"
<% if (errors.get("username") != null) { %> id="usernametf" autocomplete="off">
<span class="jive-error-text">Invalid username. </span> <% if (errors.get("username") != null) { %>
<% } else if (errors.get("usernameAlreadyExists") != null) { %> <span class="jive-error-text">Invalid username. </span>
<span class="jive-error-text">Username already exists - please choose a different one. </span> <% } else if (errors.get("usernameAlreadyExists") != null) { %>
<% } %> <span class="jive-error-text">Username already exists - please choose a different one.</span>
</td> <% } %>
</td>
</tr> </tr>
<tr> <tr>
<td width="1%" class="c1">Name:</td> <td width="1%" nowrap>
<td class="c2"> <label for="nametf">Name:</label>
<input type="text" name="name" size="30" maxlength="75" value="<%= ((name!=null) ? name : "") %>"/> </td>
<% if (errors.get("name") != null) { %> <td width="99%">
<span class="jive-error-text">Invalid name. </span> <input type="text" name="name" size="30" maxlength="75" value="<%= ((name!=null) ? name : "") %>"
<% } %> id="nametf">
</td> <% if (errors.get("name") != null) { %>
<span class="jive-error-text">Invalid name. </span>
<% } %>
</td>
</tr> </tr>
<tr> <tr>
<td width="1%" class="c1">Email:</td> <td width="1%" nowrap>
<td class="c2"> <label for="emailtf">Email:</label></td>
<input type="text" name="email" size="30" maxlength="75" value="<%= ((email!=null) ? email : "") %>"/> <td width="99%">
<% if (errors.get("email") != null) { %> <input type="text" name="email" size="30" maxlength="75" value="<%= ((email!=null) ? email : "") %>"
<span class="jive-error-text">Invalid email. </span> id="emailtf">
<% } %> <% if (errors.get("email") != null) { %>
</td> <span class="jive-error-text">Invalid email. </span>
<% } %>
</td>
</tr> </tr>
<tr> <tr>
<td class="c1">Password: *</td> <td nowrap>
<td class="c2"> <label for="passtf">Password:</label> *
<input type="password" name="password" value="" size="20" maxlength="75"/> </td>
<% if (errors.get("password") != null) { %> <td width="99%">
<span class="jive-error-text">Invalid password. </span> <input type="password" name="password" value="" size="20" maxlength="75"
<% } else if (errors.get("passwordMatch") != null) { %> id="passtf">
<span class="jive-error-text">Passwords don't match. </span> <% if (errors.get("password") != null) { %>
<% } %> <span class="jive-error-text">Invalid password. </span>
</td> <% } else if (errors.get("passwordMatch") != null) { %>
<span class="jive-error-text">Passwords don't match. </span>
<% } %>
</td>
</tr> </tr>
<tr> <tr>
<td width="1%" class="c1">Confirm Password: *</td> <td width="1%" nowrap>
<td class="c2"> <label for="confpasstf">Confirm Password:</label> *
<input type="password" name="passwordConfirm" value="" size="20" maxlength="75"/> </td>
<% if (errors.get("passwordConfirm") != null) { %> <td width="99%">
<span class="jive-error-text">Invalid password confirmation. </span> <input type="password" name="passwordConfirm" value="" size="20" maxlength="75"
<% } %> id="confpasstf">
</td> <% if (errors.get("passwordConfirm") != null) { %>
<span class="jive-error-text">Invalid password confirmation. </span>
<% } %>
</td>
</tr> </tr>
<tr> </tbody>
<td colspan="2" nowrap><input type="submit" name="create" value="Create User"/><input type="submit" name="cancel" value="Cancel"/> </table>
</tr></td></fieldset> <br>
</form> <span class="jive-description">
<script language="JavaScript" type="text/javascript"> * Required fields
document.f.username.focus(); </span>
function checkFields() { </div>
} </fieldset>
</script>
<jsp:include page="bottom.jsp" flush="true"/> <br><br>
</table>
<input type="submit" name="create" value="Create User">
<input type="submit" name="another" value="Create &amp; Create Another">
<input type="submit" name="cancel" value="Cancel">
</form>
<script language="JavaScript" type="text/javascript">
document.f.username.focus();
</script>
<jsp:include page="bottom.jsp" flush="true"/>
\ No newline at end of file
...@@ -174,13 +174,11 @@ Below is a summary of user properties. To edit properties, click the "Edit" butt ...@@ -174,13 +174,11 @@ Below is a summary of user properties. To edit properties, click the "Edit" butt
</td> </td>
<td> <td>
<% if ("".equals(user.getName())) { %> <% if ("".equals(user.getName())) { %>
<span style="color:#999"> <span style="color:#999">
<i>Not set.</i> <i>Not set.</i>
</span> </span>
<% } else { %> <% } else { %>
<%= user.getName() %> <%= user.getName() %>
<% } %> <% } %>
...@@ -191,7 +189,15 @@ Below is a summary of user properties. To edit properties, click the "Edit" butt ...@@ -191,7 +189,15 @@ Below is a summary of user properties. To edit properties, click the "Edit" butt
Email: Email:
</td> </td>
<td> <td>
<a href="mailto:<%= user.getEmail() %>"><%= user.getEmail() %></a> <% if (user.getEmail() == null) { %>
<span style="color:#999">
<i>Not set.</i>
</span>
<% } else { %>
<a href="mailto:<%= user.getEmail() %>"><%= user.getEmail() %></a>
<% } %>
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment