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 @@
<p>Use the form below to create a new group.</p>
<form name="f" action="group-create.jsp" method="post">
<fieldset>
<legend>Create New Group</legend>
<div>
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600">
<tr valign="middle" class="jive-even">
<td>
Group Name: *
</td>
<td>
<input type="text" name="name" size="30" maxlength="75"
value="<%= ((name!=null) ? name : "") %>">
<% if (errors.get("name") != null) { %>
<span class="jive-error-text">
Invalid name.
</span>
<% } else if (errors.get("groupAlreadyExists") != null) { %>
<span class="jive-error-text">
Group already exists - please choose a different name.
</span>
<% } %>
</td>
</tr>
<tr valign="middle" class="jive-odd">
<td>
Description:
</td>
<td>
<input type="text" name="description" size="30" maxlength="75"
value="<%= ((description!=null) ? description : "") %>">
<% if (errors.get("description") != null) { %>
<span class="jive-error-text">
Invalid description.
</span>
<% } %>
</td>
</tr>
</table>
<br>
* Required fields
</div>
<legend>Create New Group</legend>
<div>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr valign="top">
<td width="1%" nowrap>
<label for="gname">Group Name:</label> *
</td>
<td width="99%">
<input type="text" name="name" size="30" maxlength="75" value="<%= ((name!=null) ? name : "") %>"
id="gname">
<% if (errors.get("name") != null) { %>
<span class="jive-error-text">
Invalid name.
</span>
<% } else if (errors.get("groupAlreadyExists") != null) { %>
<span class="jive-error-text">
Group already exists - please choose a different name.
</span>
<% } %>
</td>
</tr>
<tr valign="top">
<td width="1%" nowrap>
<label for="gdesc">Description:</label>
</td>
<td width="99%">
<textarea name="description" cols="30" rows="5" id="gdesc"
><%= ((description!=null) ? description : "") %></textarea>
<% if (errors.get("description") != null) { %>
<span class="jive-error-text">
Invalid description.
</span>
<% } %>
</td>
</tr>
</table>
<br>
<span class="jive-description">
* Required fields
</span>
</div>
</fieldset>
<br><br>
......
......@@ -123,12 +123,12 @@ Below is a summary of the group. To edit properties, click the "Edit" button bel
Description:
</td>
<td>
<% if (group.getDescription() == null) { %>
&nbsp;
<% if (group.getDescription() == null || "".equals(group.getDescription().trim())) { %>
<span style="color:#999">
<i>Not set.</i>
</span>
<% } else { %>
<%= group.getDescription() %>
<% } %>
......
......@@ -34,7 +34,6 @@
<jsp:include page="title.jsp" flush="true" />
<% // Get parameters
try {
int start = ParamUtils.getIntParameter(request,"start",0);
int range = ParamUtils.getIntParameter(request,"range",15);
......@@ -180,6 +179,4 @@ Total Groups: <%= webManager.getGroupManager().getGroupCount() %>,
<% } %>
<% } catch (Exception e) { e.printStackTrace(); } %>
<jsp:include page="bottom.jsp" flush="true" />
......@@ -111,7 +111,7 @@ Administrator Account
</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
mix of letters and numbers. You can skip this step if you have already setup your admin
account (not for first time users).
......
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%--
- $RCSfile$
- $Revision$
......@@ -9,6 +8,7 @@
- This software is published under the terms of the GNU Public License (GPL),
- a copy of which is included in this distribution.
--%>
<%@ page import="org.jivesoftware.util.*,
java.util.HashMap,
java.util.Map,
......@@ -34,7 +34,8 @@
<% webManager.init(request, response, session, application, out ); %>
<% // 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;
String username = ParamUtils.getParameter(request,"username");
String name = ParamUtils.getParameter(request,"name");
......@@ -70,7 +71,12 @@
User newUser = webManager.getUserManager().createUser(username, password, name, email);
// 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;
}
catch (UserAlreadyExistsException e) {
......@@ -85,6 +91,7 @@
}
}
%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean"/>
<% // Title of this page and breadcrumbs
String title = "Create User";
......@@ -95,88 +102,128 @@
%>
<jsp:include page="top.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="errors" value="${errors}"/>
<% if (errors.get("general") != null) { %>
<div class="jive-success">
<table cellpadding="0" cellspacing="0" border="0">
<% if (errors.get("general") != null) { %>
<div class="jive-error">
<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">Error creating the user account. Please check your error logs.</td>
</tr>
<tr>
<td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16" border="0"/></td>
<td class="jive-icon-label">Error creating the user account. Please check your error logs.</td>
</tr>
</tbody>
</table>
</div>
<br/>
<% } %>
</table>
</div>
<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">
<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>
<td width="1%" class="c1">Username: *</td>
<td class="c2">
<input type="text" name="username" size="30" maxlength="75" value="<%= ((username!=null) ? username : "") %>"/>
<% if (errors.get("username") != null) { %>
<span class="jive-error-text">Invalid username. </span>
<% } else if (errors.get("usernameAlreadyExists") != null) { %>
<span class="jive-error-text">Username already exists - please choose a different one. </span>
<% } %>
</td>
<td width="1%" nowrap><label for="usernametf">Username:</label> *</td>
<td width="99%">
<input type="text" name="username" size="30" maxlength="75" value="<%= ((username!=null) ? username : "") %>"
id="usernametf" autocomplete="off">
<% if (errors.get("username") != null) { %>
<span class="jive-error-text">Invalid username. </span>
<% } else if (errors.get("usernameAlreadyExists") != null) { %>
<span class="jive-error-text">Username already exists - please choose a different one.</span>
<% } %>
</td>
</tr>
<tr>
<td width="1%" class="c1">Name:</td>
<td class="c2">
<input type="text" name="name" size="30" maxlength="75" value="<%= ((name!=null) ? name : "") %>"/>
<% if (errors.get("name") != null) { %>
<span class="jive-error-text">Invalid name. </span>
<% } %>
</td>
<td width="1%" nowrap>
<label for="nametf">Name:</label>
</td>
<td width="99%">
<input type="text" name="name" size="30" maxlength="75" value="<%= ((name!=null) ? name : "") %>"
id="nametf">
<% if (errors.get("name") != null) { %>
<span class="jive-error-text">Invalid name. </span>
<% } %>
</td>
</tr>
<tr>
<td width="1%" class="c1">Email:</td>
<td class="c2">
<input type="text" name="email" size="30" maxlength="75" value="<%= ((email!=null) ? email : "") %>"/>
<% if (errors.get("email") != null) { %>
<span class="jive-error-text">Invalid email. </span>
<% } %>
</td>
<td width="1%" nowrap>
<label for="emailtf">Email:</label></td>
<td width="99%">
<input type="text" name="email" size="30" maxlength="75" value="<%= ((email!=null) ? email : "") %>"
id="emailtf">
<% if (errors.get("email") != null) { %>
<span class="jive-error-text">Invalid email. </span>
<% } %>
</td>
</tr>
<tr>
<td class="c1">Password: *</td>
<td class="c2">
<input type="password" name="password" value="" size="20" maxlength="75"/>
<% if (errors.get("password") != null) { %>
<span class="jive-error-text">Invalid password. </span>
<% } else if (errors.get("passwordMatch") != null) { %>
<span class="jive-error-text">Passwords don't match. </span>
<% } %>
</td>
<td nowrap>
<label for="passtf">Password:</label> *
</td>
<td width="99%">
<input type="password" name="password" value="" size="20" maxlength="75"
id="passtf">
<% if (errors.get("password") != null) { %>
<span class="jive-error-text">Invalid password. </span>
<% } else if (errors.get("passwordMatch") != null) { %>
<span class="jive-error-text">Passwords don't match. </span>
<% } %>
</td>
</tr>
<tr>
<td width="1%" class="c1">Confirm Password: *</td>
<td class="c2">
<input type="password" name="passwordConfirm" value="" size="20" maxlength="75"/>
<% if (errors.get("passwordConfirm") != null) { %>
<span class="jive-error-text">Invalid password confirmation. </span>
<% } %>
</td>
<td width="1%" nowrap>
<label for="confpasstf">Confirm Password:</label> *
</td>
<td width="99%">
<input type="password" name="passwordConfirm" value="" size="20" maxlength="75"
id="confpasstf">
<% if (errors.get("passwordConfirm") != null) { %>
<span class="jive-error-text">Invalid password confirmation. </span>
<% } %>
</td>
</tr>
<tr>
<td colspan="2" nowrap><input type="submit" name="create" value="Create User"/><input type="submit" name="cancel" value="Cancel"/>
</tr></td></fieldset>
</form>
<script language="JavaScript" type="text/javascript">
document.f.username.focus();
function checkFields() {
}
</script>
</tbody>
</table>
<br>
<span class="jive-description">
* Required fields
</span>
</div>
</fieldset>
<jsp:include page="bottom.jsp" flush="true"/>
</table>
<br><br>
<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
</td>
<td>
<% if ("".equals(user.getName())) { %>
<span style="color:#999">
<i>Not set.</i>
</span>
<% } else { %>
<%= user.getName() %>
<% } %>
......@@ -191,7 +189,15 @@ Below is a summary of user properties. To edit properties, click the "Edit" butt
Email:
</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;
</td>
</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