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

Fixed minor problems. JM-141


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@914 b35dd754-fafc-0310-a699-88a17e54d16e
parent b989cb86
......@@ -68,7 +68,7 @@
if (groupDisplayName == null) {
errors.put("groupDisplayName", "");
}
if ("spefgroups".equals(showGroup) && groupNames == null) {
if ("spefgroups".equals(showGroup) && (groupNames == null || groupNames.length == 0)) {
errors.put("groupNames","");
}
}
......@@ -273,6 +273,12 @@ Use the form below to create a group.
<td width="99%">
<input type="text" name="groupDisplayName" size="30" maxlength="100" value="<%= (groupDisplayName != null ? groupDisplayName : "") %>"
onclick="this.form.enableRosterGroups[1].checked=true;">
<% if (errors.get("groupDisplayName") != null) { %>
<span class="jive-error-text">Enter a Group Display Name.</span>
<% } %>
</td>
</tr>
</tbody>
......@@ -295,7 +301,7 @@ Use the form below to create a group.
<td width="1%" nowrap>
<input type="radio" name="showGroup" value="onlyGroup" id="rb001"
onclick="this.form.enableRosterGroups[1].checked=true;"
<%= ("onlyGroup".equals(showGroup) ? "checked" : "") %>>
<%= ("onlyGroup".equals(showGroup) && (groupNames == null || groupNames.length == 0) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb001"
......
......@@ -62,21 +62,18 @@ import="java.text.DateFormat,
group.setName(newName);
group.setDescription(newDescription);
if (enableRosterGroups) {
boolean shizzledizzle = false;
if ("spefgroups".equals(showGroup)) {
showGroup = "onlyGroup";
shizzledizzle = true;
}
else {
groupNames = new String[] {};
}
group.getProperties().put("sharedRoster.showInRoster", showGroup);
if (groupDisplayName != null) {
group.getProperties().put("sharedRoster.displayName", groupDisplayName);
}
if (shizzledizzle) {
group.getProperties().put("sharedRoster.groupList", toList(groupNames));
}
group.getProperties().put("sharedRoster.groupList", toList(groupNames));
}
else {
group.getProperties().put("sharedRoster.showInRoster", "nobody");
......@@ -84,8 +81,6 @@ import="java.text.DateFormat,
group.getProperties().put("sharedRoster.groupList", "");
}
groupName = newName;
groupInfoChanged = true;
// Get admin list and compare it the admin posted list.
......@@ -183,7 +178,7 @@ import="java.text.DateFormat,
if (errors.size() == 0) {
enableRosterGroups = !"nobody".equals(group.getProperties().get("sharedRoster.showInRoster"));
showGroup = group.getProperties().get("sharedRoster.showInRoster");
if (!"onlyGroup".equals(showGroup)) {
if ("onlyGroup".equals(showGroup)) {
String glist = group.getProperties().get("sharedRoster.groupList");
List l = new ArrayList();
if (glist != null) {
......@@ -390,7 +385,7 @@ import="java.text.DateFormat,
<td width="1%" nowrap>
<input type="radio" name="showGroup" value="onlyGroup" id="rb001"
onclick="this.form.enableRosterGroups[1].checked=true;"
<%= ("onlyGroup".equals(showGroup) ? "checked" : "") %>>
<%= ("onlyGroup".equals(showGroup) && (groupNames == null || groupNames.length == 0) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb001"
......
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