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"%> ...@@ -110,6 +110,22 @@ errorPage="error.jsp"%>
<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}"/>
<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) { if (errors.get("general") != null) {
%> %>
...@@ -147,7 +163,7 @@ errorPage="error.jsp"%> ...@@ -147,7 +163,7 @@ errorPage="error.jsp"%>
</td> </td>
<td width="99%"> <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 : "") %>" id="gname"> value="<%= ((name != null) ? name : "") %>" id="gname" onChange="setDisplayName()">
<% <%
if (errors.get("name") != null) { if (errors.get("name") != null) {
%> %>
...@@ -178,12 +194,22 @@ errorPage="error.jsp"%> ...@@ -178,12 +194,22 @@ errorPage="error.jsp"%>
%> %>
</td> </td>
</tr> </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> <tr>
<td width="1%" nowrap> <td width="1%" nowrap>
<label for="gshow">Show group in group members' rosters:</label> <label for="gshow">Show group in group members' rosters:</label>
</td> </td>
<td width="99%"> <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> </td>
</tr> </tr>
<tr> <tr>
...@@ -191,7 +217,7 @@ errorPage="error.jsp"%> ...@@ -191,7 +217,7 @@ errorPage="error.jsp"%>
<label for="gdisplay">Display name in roster:</label> <label for="gdisplay">Display name in roster:</label>
</td> </td>
<td nowrap class="c1" align="left"> <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) { if (errors.get("display") != null) {
%> %>
...@@ -201,15 +227,6 @@ errorPage="error.jsp"%> ...@@ -201,15 +227,6 @@ errorPage="error.jsp"%>
%> %>
</td> </td>
</tr> </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> </table>
<br> <br>
<span class="jive-description"> * Required fields </span> <span class="jive-description"> * Required fields </span>
......
...@@ -163,6 +163,16 @@ import="java.text.DateFormat, ...@@ -163,6 +163,16 @@ import="java.text.DateFormat,
Edit group settings and add or remove group members and administrators Edit group settings and add or remove group members and administrators
using the forms below. using the forms below.
</p> </p>
<script language="javascript">
<!--
function refreshDisplayName(showCheck)
{
document.forms.ff.newDisplay.disabled=!showCheck.checked;
}
//-->
</script>
<% <%
if (success) { if (success) {
%> %>
...@@ -250,11 +260,12 @@ import="java.text.DateFormat, ...@@ -250,11 +260,12 @@ import="java.text.DateFormat,
<% } %> <% } %>
</tr> </tr>
<tr><td height="15" colspan="3"><img src="images/blank.gif"></td>
<tr> <tr>
<td width="1%" nowrap> <td width="1%" nowrap>
Show group in group members' rosters: Show group in group members' rosters:
</td> </td>
<% boolean showInRoster = "true".equals(group.getProperties().get("showInRoster")); <% boolean showInRoster = "true".equals(group.getProperties().get("showInRoster")) || errors.get("display") != null;
if(!edit) { %> if(!edit) { %>
<td colspan="2"> <td colspan="2">
<%= (showInRoster ? "Enabled" : "Disabled") %> <%= (showInRoster ? "Enabled" : "Disabled") %>
...@@ -262,7 +273,7 @@ import="java.text.DateFormat, ...@@ -262,7 +273,7 @@ import="java.text.DateFormat,
<% } else { %> <% } else { %>
<td> <td>
<input type="checkbox" name="newShow" value="true" <%= (showInRoster ? "checked" : "") %>/> <input type="checkbox" name="newShow" value="true" <%= (showInRoster ? "checked" : "") %> onclick="refreshDisplayName(this)"/>
</td> </td>
<% } %> <% } %>
...@@ -279,7 +290,7 @@ import="java.text.DateFormat, ...@@ -279,7 +290,7 @@ import="java.text.DateFormat,
<% } else { %> <% } else { %>
<td> <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) { 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