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