Commit 5b242506 authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Admin 2.0 Work


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@532 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0d0f01a7
<%@ taglib uri="core" prefix="c"%>
<%-- <%--
- $RCSfile$ - $RCSfile$
- $Revision$ - $Revision$
...@@ -8,7 +9,6 @@ ...@@ -8,7 +9,6 @@
- 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,
...@@ -27,13 +27,9 @@ ...@@ -27,13 +27,9 @@
org.dom4j.*" org.dom4j.*"
errorPage="error.jsp" errorPage="error.jsp"
%> %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"/>
<%@ taglib uri="core" prefix="c"%> <jsp:useBean id="errors" class="java.util.HashMap"/>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<jsp:useBean id="errors" class="java.util.HashMap" />
<% 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 create = request.getParameter("create") != null;
boolean cancel = request.getParameter("cancel") != null; boolean cancel = request.getParameter("cancel") != null;
...@@ -90,8 +86,7 @@ ...@@ -90,8 +86,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";
pageinfo.setTitle(title); pageinfo.setTitle(title);
...@@ -99,146 +94,90 @@ ...@@ -99,146 +94,90 @@
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-create.jsp")); pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-create.jsp"));
pageinfo.setPageID("user-create"); pageinfo.setPageID("user-create");
%> %>
<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"/>
<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) { %> <% if (errors.get("general") != null) { %>
<div class="jive-success">
<div class="jive-success">
<table cellpadding="0" cellspacing="0" border="0"> <table cellpadding="0" cellspacing="0" border="0">
<tbody> <tbody>
<tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0"></td> <tr>
<td class="jive-icon-label"> <td class="jive-icon">
Error creating the user account. Please check your error logs. <img src="images/success-16x16.gif" width="16" height="16" border="0"/>
</td></tr> </td>
<td class="jive-icon-label">Error creating the user account. Please check your error logs.</td>
</tr>
</tbody> </tbody>
</table> </table>
</div><br> </div>
<br/>
<% } %> <% } %>
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600">
<form name="f" action="user-create.jsp" method="post"> <form name="f" action="user-create.jsp" method="post">
<tr><td class="text" colspan="2"> <fieldset><legend>Create New User</legend>
Use the form below to create a new user in the system. <table cellpadding="3" cellspacing="1" border="0">
</td></tr>
<tr><td class="c1">* Required fields</td></tr>
<tr class="jive-even"> <tr>
<td> <td width="1%" class="c1">Username: *</td>
Username: * <td class="c2">
</td> <input type="text" name="username" size="30" maxlength="75" value="<%= ((username!=null) ? username : "") %>"/>
<td>
<input type="text" name="username" size="30" maxlength="75"
value="<%= ((username!=null) ? username : "") %>">
<% if (errors.get("username") != null) { %> <% if (errors.get("username") != null) { %>
<span class="jive-error-text">Invalid username. </span>
<span class="jive-error-text">
Invalid username.
</span>
<% } else if (errors.get("usernameAlreadyExists") != null) { %> <% } else if (errors.get("usernameAlreadyExists") != null) { %>
<span class="jive-error-text">Username already exists - please choose a different one. </span>
<span class="jive-error-text">
Username already exists - please choose a different one.
</span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<tr class="jive-odd"> <tr>
<td> <td width="1%" class="c1">Name:</td>
Name: <td class="c2">
</td> <input type="text" name="name" size="30" maxlength="75" value="<%= ((name!=null) ? name : "") %>"/>
<td>
<input type="text" name="name" size="30" maxlength="75"
value="<%= ((name!=null) ? name : "") %>">
<% if (errors.get("name") != null) { %> <% if (errors.get("name") != null) { %>
<span class="jive-error-text">Invalid name. </span>
<span class="jive-error-text">
Invalid name.
</span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<tr class="jive-even"> <tr>
<td> <td width="1%" class="c1">Email:</td>
Email: <td class="c2">
</td> <input type="text" name="email" size="30" maxlength="75" value="<%= ((email!=null) ? email : "") %>"/>
<td>
<input type="text" name="email" size="30" maxlength="75"
value="<%= ((email!=null) ? email : "") %>">
<% if (errors.get("email") != null) { %> <% if (errors.get("email") != null) { %>
<span class="jive-error-text">Invalid email. </span>
<span class="jive-error-text">
Invalid email.
</span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<tr class="jive-odd"> <tr>
<td> <td class="c1">Password: *</td>
Password: * <td class="c2">
</td> <input type="password" name="password" value="" size="20" maxlength="75"/>
<td>
<input type="password" name="password" value="" size="20" maxlength="75">
<% if (errors.get("password") != null) { %> <% if (errors.get("password") != null) { %>
<span class="jive-error-text">Invalid password. </span>
<span class="jive-error-text">
Invalid password.
</span>
<% } else if (errors.get("passwordMatch") != null) { %> <% } else if (errors.get("passwordMatch") != null) { %>
<span class="jive-error-text">Passwords don't match. </span>
<span class="jive-error-text">
Passwords don't match.
</span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<tr class="jive-even"> <tr>
<td> <td width="1%" class="c1">Confirm Password: *</td>
Confirm Password: * <td class="c2">
</td> <input type="password" name="passwordConfirm" value="" size="20" maxlength="75"/>
<td>
<input type="password" name="passwordConfirm" value="" size="20" maxlength="75">
<% if (errors.get("passwordConfirm") != null) { %> <% if (errors.get("passwordConfirm") != null) { %>
<span class="jive-error-text">Invalid password confirmation. </span>
<span class="jive-error-text">
Invalid password confirmation.
</span>
<% } %> <% } %>
</td> </td>
</tr> </tr>
</table> <tr>
</div> <td colspan="2" nowrap><input type="submit" name="create" value="Create User"/><input type="submit" name="cancel" value="Cancel"/>
</tr></td></fieldset>
<p> </form>
* Required fields <script language="JavaScript" type="text/javascript">
</p> document.f.username.focus();
function checkFields() {
<input type="submit" name="create" value="Create User"> }
<input type="submit" name="cancel" value="Cancel"> </script>
</form>
<script language="JavaScript" type="text/javascript">
document.f.username.focus();
function checkFields() { <jsp:include page="bottom.jsp" flush="true"/>
</table>
}
</script>
<jsp:include page="bottom.jsp" flush="true" />
<%@ taglib uri="core" prefix="c"%><%-- <%@ taglib uri="core" prefix="c"%>
<%--
- $RCSfile$ - $RCSfile$
- $Revision$ - $Revision$
- $Date$ - $Date$
--%> --%>
<%@ page import="org.jivesoftware.util.*, <%@ page import="org.jivesoftware.util.*,
org.jivesoftware.messenger.user.*, org.jivesoftware.messenger.user.*,
java.util.HashMap, java.util.HashMap,
org.jivesoftware.admin.*, org.jivesoftware.admin.*,
java.util.Map" %> java.util.Map"
%>
<%-- Define Administration Bean --%> <%-- Define Administration Bean --%>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" /> <jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"/>
<% webManager.init(request, response, session, application, out ); %> <% webManager.init(request, response, session, application, out ); %>
<% <%
// Get parameters // Get parameters
boolean search = ParamUtils.getBooleanParameter(request,"search"); boolean search = ParamUtils.getBooleanParameter(request,"search");
String username = ParamUtils.getParameter(request,"username"); String username = ParamUtils.getParameter(request,"username");
...@@ -42,7 +41,7 @@ ...@@ -42,7 +41,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 = "User Search"; String title = "User Search";
pageinfo.setTitle(title); pageinfo.setTitle(title);
...@@ -50,44 +49,28 @@ ...@@ -50,44 +49,28 @@
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-search.jsp")); pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-search.jsp"));
pageinfo.setPageID("user-search"); pageinfo.setPageID("user-search");
%> %>
<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"/>
<% if (errors.size() > 0) { %> <% if (errors.size() > 0) { %>
<p class="jive-error-text">User not found. Please try a different search.</p>
<p class="jive-error-text">
User not found. Please try a different search.
</p>
<% } %> <% } %>
<table cellpadding="3" cellspacing="1" border="0" width="600">
<form name="f" action="user-search.jsp"> <form name="f" action="user-search.jsp">
<tr><td class="text" colspan="2"> <input type="hidden" name="search" value="true"/>
Use the form below to search for users in the system. <fieldset>
<legend>Search For User</legend>
<input type="hidden" name="search" value="true"> <table cellpadding="3" cellspacing="1" border="0" width="600">
<tr class="c1">
<td width="1%">Username:</td>
<tr class="jive-even"> <td class="c2">
<td width="1%"> <input type="text" name="username" value="<%= ((username!=null) ? username : "") %>" size="30" maxlength="75"/>
Username:
</td> </td>
<td> </tr>
<input type="text" name="username" value="<%= ((username!=null) ? username : "") %>" size="30" maxlength="75"> <tr><td colspan="2" nowrap><input type="submit" name="search" value="Search!"/><input type="submit" name="cancel" value="Cancel"/></td>
</td> </tr>
</tr> </table>
</table> </fieldset>
<br>
<input type="submit" name="search" value="Search!">
<input type="submit" name="cancel" value="Cancel">
</form> </form>
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
document.f.username.focus(); document.f.username.focus();
</script> </script>
<jsp:include page="bottom.jsp" flush="true"/>
<jsp:include page="bottom.jsp" flush="true" />
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