Commit 848e1eae authored by Bill Lynch's avatar Bill Lynch Committed by bill

UI cleanup


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@358 b35dd754-fafc-0310-a699-88a17e54d16e
parent 47edf68d
<%@ taglib uri="core" prefix="c"%><%--
<%--
- $RCSfile$
- $Revision$
- $Date$
......@@ -8,8 +8,14 @@
org.jivesoftware.messenger.handler.IQRegisterHandler,
org.jivesoftware.messenger.handler.IQAuthHandler,
org.jivesoftware.admin.AdminPageBean"
errorPage="error.jsp"
%>
<%@ taglib uri="core" prefix="c" %>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Registration Settings";
......@@ -19,15 +25,6 @@
pageinfo.setPageID("server-reg-and-login");
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Registration and Login Settings" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="reg-settings.jsp" />
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
......@@ -55,74 +52,98 @@
anonLogin = authHandler.isAllowAnonymous();
%>
<p>
Use the forms below to change various aspects of user registration and login.
</p>
<form action="reg-settings.jsp">
<c:if test="${success}" >
<p class="jive-success-text">
Settings updated.
</p>
<c:if test="${success}" >
<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">
Settings updated successfully.
</td></tr>
</tbody>
</table>
</div><br>
</c:if>
<table cellpadding="3" cellspacing="0" border="0" width="600">
<tr class="tableHeader"><td colspan="2" align="left">Inband Account Registration</td></tr>
<tr><td colspan="2" class="text">
<fieldset>
<legend>Inband Account Registration</legend>
<div>
<p>
Inband account registration allows users to create accounts on the server automatically using most
clients. It does not affect the ability to create new accounts through this web administration
interface. Administrators may want to disable this option so users are required to register by
other means (e.g. sending requests to the server administrator or through your own custom web
interface).
</td></tr>
<tr valign="top" class="">
<td width="1%" nowrap>
<input type="radio" name="inbandEnabled" value="true" id="rb01"
<%= ((inbandEnabled) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01"><b>Enabled</b></label> - Users can automatically create new accounts.
</td>
</tr>
<td width="1%" nowrap>
<input type="radio" name="inbandEnabled" value="false" id="rb02"
<%= ((!inbandEnabled) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02"><b>Disabled</b></label> - Users can not automatically create new
accounts.
</td>
</tr>
</p>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="1%">
<input type="radio" name="inbandEnabled" value="true" id="rb01"
<%= ((inbandEnabled) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01"><b>Enabled</b></label> - Users can automatically create new accounts.
</td>
</tr>
<tr>
<td width="1%">
<input type="radio" name="inbandEnabled" value="false" id="rb02"
<%= ((!inbandEnabled) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02"><b>Disabled</b></label> - Users can not automatically create new accounts.
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
<br><br>
</ul>
<br>
<table cellpadding="3" cellspacing="0" border="0" width="600">
<tr class="tableHeader"><td colspan="2" align="left">Anonymous Login</td></tr>
<tr><td class="text" colspan="2">
<fieldset>
<legend>Anonymous Login</legend>
<div>
<p>
You can choose to enable or disable anonymous user login. If it is enabled, anyone can
connect to the server and create a new session. If it is disabled only users who have
accounts will be able to connect.
</td></tr>
<tr valign="top" class="">
<td width="1%" nowrap>
</p>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="1%">
<input type="radio" name="anonLogin" value="true" id="rb03"
<%= ((anonLogin) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb03"><b>Enabled</b></label> - Anyone may login to the server.
</td>
</tr>
<td width="1%" nowrap>
</td>
<td width="99%">
<label for="rb03"><b>Enabled</b></label> - Anyone may login to the server.
</td>
</tr>
<tr>
<td width="1%">
<input type="radio" name="anonLogin" value="false" id="rb04"
<%= ((!anonLogin) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb04"><b>Disabled</b></label> - Only registered users may login.
</td>
</tr>
</td>
<td width="99%">
<label for="rb04"><b>Disabled</b></label> - Only registered users may login.
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
</ul>
<br>
<br><br>
<input type="submit" name="save" value="Save Settings">
......
<%@ taglib uri="core" prefix="c" %>
<%@ taglib uri="fmt" prefix="fmt" %>
<%--
- $RCSfile$
- $Revision$
- $Date$
--%>
<%@ taglib uri="core" prefix="c" %>
<%@ taglib uri="fmt" prefix="fmt" %>
<%@ page import="org.jivesoftware.util.*,
java.util.Iterator,
org.jivesoftware.messenger.*,
......@@ -13,7 +14,13 @@
java.text.DateFormat,
java.util.HashMap,
java.util.Map,
org.jivesoftware.admin.AdminPageBean" %>
org.jivesoftware.admin.AdminPageBean"
errorPage="error.jsp"
%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Conflict Policy";
......@@ -23,15 +30,6 @@
pageinfo.setPageID("server-session-conflict");
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<!-- Define BreadCrumbs -->
<c:set var="title" value="Resource Conflict Policy" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="session-conflict.jsp" />
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
......@@ -40,8 +38,6 @@
int kickPolicy = ParamUtils.getIntParameter(request,"kickPolicy",Integer.MAX_VALUE);
int kickValue = ParamUtils.getIntParameter(request,"kickValue",-2);
if (kickPolicy == -2) {
kickPolicy = admin.getSessionManager().getConflictKickLimit();
}
......@@ -64,9 +60,18 @@
admin.getSessionManager().setConflictKickLimit(kickPolicy);
}
%>
<p class="jive-success-text">
Settings updated.
</p>
<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">
Settings updated successfully.
</td></tr>
</tbody>
</table>
</div><br>
<%
......@@ -76,8 +81,8 @@
// Update variable values
kickPolicy = admin.getSessionManager().getConflictKickLimit();
%>
<table cellpadding="3" cellspacing="1" border="0" width="600">
<tr><td colspan="2" class="text">
<p>
<fmt:message key="title" bundle="${lang}" /> allows multiple logins to the same user account by assigning a unique "resource name"
to each connection. If a connection requests a resource name that is already in use, the server must
decide how to handle the conflict. The options on this page allow you to determine if the server
......@@ -85,87 +90,84 @@ always kicks off existing connections, never kicks off existing connections, or
login attempts that should be rejected before kicking off an
existing connection. The last option allows users to receive an error when logging in that
allows them to request a different resource name.
<% if (ParamUtils.getBooleanParameter(request,"success")) { %>
<p class="jive-success-text">
Settings updated.
</p>
<% } %>
<form action="session-conflict.jsp">
<tr valign="top" class="">
<td width="1%" nowrap>
<input type="radio" name="kickPolicy" value="0" id="rb01"
<%= ((kickPolicy==0) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01"><b>Always kick</b></label> - If there is a resource conflict,
immediately kick the other resource.
</td>
</tr>
<tr valign="top">
<td width="1%" nowrap>
<input type="radio" name="kickPolicy" value="<%= SessionManager.NEVER_KICK %>" id="rb02"
<%= ((kickPolicy==SessionManager.NEVER_KICK) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02"><b>Never kick</b></label> - If there is a resource conflict, don't
allow the new resource to log in.
</td>
</tr>
<tr valign="top" class="">
<td width="1%" nowrap>
<input type="radio" name="kickPolicy" value="1" id="rb04"
<%= ((kickPolicy==1) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb04"><b>Allow one login attempt</b></label> - If there is a resource conflict,
report an error one time but don't kick the existing connection.
</td>
</tr>
</p>
<form action="session-conflict.jsp" method="post">
<fieldset>
<legend>Set Conflict Policy</legend>
<div>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr valign="top">
<td width="1%">
<input type="radio" name="kickPolicy" value="0" id="rb01"
<%= ((kickPolicy==0) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01"><b>Always kick</b></label> - If there is a resource conflict,
immediately kick the other resource.
</td>
</tr>
<tr valign="top">
<td width="1%">
<input type="radio" name="kickPolicy" value="<%= SessionManager.NEVER_KICK %>" id="rb02"
<%= ((kickPolicy==SessionManager.NEVER_KICK) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02"><b>Never kick</b></label> - If there is a resource conflict, don't
allow the new resource to log in.
</td>
</tr>
<tr valign="top">
<td width="1%">
<input type="radio" name="kickPolicy" value="1" id="rb04"
<%= ((kickPolicy==1) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb04"><b>Allow one login attempt</b></label> - If there is a resource conflict,
report an error one time but don't kick the existing connection.
</td>
</tr>
<% // Figure out if the kick policy is neither 0 nor SessionManager.NEVER_KICK:
boolean assignedKickPolicy = false;
if (kickPolicy != 0 && kickPolicy != 1 && kickPolicy != SessionManager.NEVER_KICK) {
assignedKickPolicy = true;
}
%>
<tr valign="top">
<td width="1%" nowrap>
<input type="radio" name="kickPolicy" value="<%= Integer.MAX_VALUE %>" id="rb03"
onfocus="this.form.kickValue.focus();"
<%= ((assignedKickPolicy) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb03"><b>Assign kick value</b></label> - Specify the number of login
attempts allowed before conflicting resources are kicked. You must specify a
number greater than one.
</td>
</tr>
<tr valign="top">
<td width="1%" nowrap>
&nbsp;
</td>
<td width="99%">
<% if (errors.get("kickValue") != null) { %>
<span class="jive-error-text">
Please enter a value greater than 1.
</span><br>
<% } %>
<input type="text" name="kickValue" value="<%= ((assignedKickPolicy) ? ""+kickPolicy : "") %>"
size="5" maxlength="10"
onclick="this.form.kickPolicy[3].checked=true;">
</td>
</tr>
</table>
<br>
<tr valign="top">
<td width="1%">
<input type="radio" name="kickPolicy" value="<%= Integer.MAX_VALUE %>" id="rb03"
onfocus="this.form.kickValue.focus();"
<%= ((assignedKickPolicy) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb03"><b>Assign kick value</b></label> - Specify the number of login
attempts allowed before conflicting resources are kicked. You must specify a
number greater than one.
</td>
</tr>
<tr valign="top">
<td width="1%">
&nbsp;
</td>
<td width="99%">
<% if (errors.get("kickValue") != null) { %>
<span class="jive-error-text">
Please enter a value greater than 1.
</span><br>
<% } %>
<input type="text" name="kickValue" value="<%= ((assignedKickPolicy) ? ""+kickPolicy : "") %>"
size="5" maxlength="10"
onclick="this.form.kickPolicy[3].checked=true;">
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
<br><br>
<input type="submit" name="update" value="Save Settings">
......
......@@ -15,6 +15,21 @@ BODY {
P {
margin-top : 0px;
}
FIELDSET DIV {
margin : 10px;
padding : 5px 3px 5px 0px;
width : 100%;
}
FIELDSET {
-moz-border-radius : 3px;
border-style : solid;
border-width : 1px;
border-color : #ccc;
width : 95%;
}
FIELDSET LEGEND {
color : #000;
}
/* --------------------------------------------- */
/* Header */
......
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