Commit ce69fdd3 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Improved UI.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@843 b35dd754-fafc-0310-a699-88a17e54d16e
parent 20afb484
......@@ -110,6 +110,22 @@ errorPage="error.jsp"%>
<jsp:include page="title.jsp" flush="true"/>
<c:set var="submit" value="${param.create}"/>
<c:set var="errors" value="${errors}"/>
<script language="javascript">
<!--
function refreshDisplayName(showCheck)
{
document.forms.f.display.disabled=!showCheck.checked;
}
function setDisplayName()
{
if (document.forms.f.display.value == "") {
document.forms.f.display.value=document.forms.f.name.value;
}
}
//-->
</script>
<%
if (errors.get("general") != null) {
%>
......@@ -147,7 +163,7 @@ errorPage="error.jsp"%>
</td>
<td width="99%">
<input type="text" name="name" size="30" maxlength="75"
value="<%= ((name != null) ? name : "") %>" id="gname">
value="<%= ((name != null) ? name : "") %>" id="gname" onChange="setDisplayName()">
<%
if (errors.get("name") != null) {
%>
......@@ -178,12 +194,22 @@ errorPage="error.jsp"%>
%>
</td>
</tr>
<tr>
<td nowrap width="1%">
Initial Member(s):
</td>
<td nowrap class="c1" align="left">
<input type="text" size="40" name="users"/>
&nbsp;
</td>
</tr>
<tr><td height="15" colspan="3"><img src="images/blank.gif"></td>
<tr>
<td width="1%" nowrap>
<label for="gshow">Show group in group members' rosters:</label>
</td>
<td width="99%">
<input type="checkbox" name="show" value="true" id="gshow"/>
<input type="checkbox" name="show" value="true" id="gshow" onclick="refreshDisplayName(this)"/>
</td>
</tr>
<tr>
......@@ -191,7 +217,7 @@ errorPage="error.jsp"%>
<label for="gdisplay">Display name in roster:</label>
</td>
<td nowrap class="c1" align="left">
<input type="text" size="40" name="display" id="gdisplay"/>
<input type="text" size="40" name="display" id="gdisplay" disabled/>
<%
if (errors.get("display") != null) {
%>
......@@ -201,15 +227,6 @@ errorPage="error.jsp"%>
%>
</td>
</tr>
<tr>
<td nowrap width="1%">
Initial Member(s):
</td>
<td nowrap class="c1" align="left">
<input type="text" size="40" name="users"/>
&nbsp;
</td>
</tr>
</table>
<br>
<span class="jive-description"> * Required fields </span>
......
......@@ -163,6 +163,16 @@ import="java.text.DateFormat,
Edit group settings and add or remove group members and administrators
using the forms below.
</p>
<script language="javascript">
<!--
function refreshDisplayName(showCheck)
{
document.forms.ff.newDisplay.disabled=!showCheck.checked;
}
//-->
</script>
<%
if (success) {
%>
......@@ -250,11 +260,12 @@ import="java.text.DateFormat,
<% } %>
</tr>
<tr><td height="15" colspan="3"><img src="images/blank.gif"></td>
<tr>
<td width="1%" nowrap>
Show group in group members' rosters:
</td>
<% boolean showInRoster = "true".equals(group.getProperties().get("showInRoster"));
<% boolean showInRoster = "true".equals(group.getProperties().get("showInRoster")) || errors.get("display") != null;
if(!edit) { %>
<td colspan="2">
<%= (showInRoster ? "Enabled" : "Disabled") %>
......@@ -262,7 +273,7 @@ import="java.text.DateFormat,
<% } else { %>
<td>
<input type="checkbox" name="newShow" value="true" <%= (showInRoster ? "checked" : "") %>/>
<input type="checkbox" name="newShow" value="true" <%= (showInRoster ? "checked" : "") %> onclick="refreshDisplayName(this)"/>
</td>
<% } %>
......@@ -279,7 +290,7 @@ import="java.text.DateFormat,
<% } else { %>
<td>
<input type="text" size="40" name="newDisplay" value="<%= displayName %>"/>
<input type="text" size="40" name="newDisplay" value="<%= displayName %>" <%= showInRoster ? "" : "disabled"%>/>
<%
if (errors.get("display") != null) {
%>
......
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