Commit 3538d3d5 authored by Bill Lynch's avatar Bill Lynch Committed by bill

More UI work, calling new APIs


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@438 b35dd754-fafc-0310-a699-88a17e54d16e
parent e6e13842
......@@ -44,6 +44,12 @@
for (String user : removeables) {
mucServer.removeUserAllowedToCreate(user);
}
mucServer.setRoomCreationRestricted(false);
response.sendRedirect("muc-create-permission.jsp?success=true");
return;
}
else {
mucServer.setRoomCreationRestricted(true);
response.sendRedirect("muc-create-permission.jsp?success=true");
return;
}
......@@ -69,10 +75,6 @@
response.sendRedirect("muc-create-permission.jsp?deletesuccess=true");
return;
}
if (errors.size() == 0) {
openPerms = mucServer.getUsersAllowedToCreate().size() == 0;
}
%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
......@@ -87,8 +89,7 @@
<jsp:include page="title.jsp" flush="true" />
<p>
Below is a list of users allowed to create rooms. An empty list means that <b>anyone</b> can create
a room.
Use the form below to set the policy for who can create chat rooms.
</p>
<% if (errors.size() > 0) { %>
......@@ -141,7 +142,7 @@ a room.
<tr>
<td width="1%">
<input type="radio" name="openPerms" value="true" id="rb01"
<%= ((openPerms) ? "checked" : "") %>>
<%= ((!mucServer.isRoomCreationRestricted()) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01">Anyone can create a chat room.</label>
......@@ -151,17 +152,26 @@ a room.
<td width="1%">
<input type="radio" name="openPerms" value="false" id="rb02"
onfocus="this.form.userJID.focus();"
<%= ((!openPerms) ? "checked" : "") %>>
<%= ((mucServer.isRoomCreationRestricted()) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02">Only specific users can create a chat room:</label>
<label for="rb02">Only specific users can create a chat room.</label>
</td>
</tr>
<tr>
<td width="1%">
&nbsp;
</td>
<td width="99%">
</tbody>
</table>
<br>
<input type="submit" name="save" value="Save Settings">
</div>
</fieldset>
</form>
<br>
<% if (mucServer.isRoomCreationRestricted()) { %>
<form action="muc-create-permission.jsp" method="post">
<fieldset>
<legend>Allowed Users</legend>
......@@ -214,17 +224,8 @@ a room.
</div>
</fieldset>
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
<br><br>
</form>
<input type="submit" name="save" value="Save Settings">
</form>
<% } %>
<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