Commit b55cc350 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Disabled editing groups when read only.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5784 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1560e145
...@@ -298,12 +298,15 @@ ...@@ -298,12 +298,15 @@
<!-- BEGIN group name and description --> <!-- BEGIN group name and description -->
<div class="jive-contentBox-plain"> <div class="jive-contentBox-plain">
<div class="jive-contentBox-toolbox"> <% // Only show edit and delete options if the groups aren't read-only.
if (!webManager.getGroupManager().isReadOnly()) { %>
<div class="jive-contentBox-toolbox">
<a href="group-create.jsp?group=<%= URLEncoder.encode(group.getName(), "UTF-8")%>&name=<%= URLEncoder.encode(group.getName(), "UTF-8")%>&description=<%= group.getDescription() != null? URLEncoder.encode(group.getDescription(), "UTF-8") : "" %>" class="jive-link-edit"><fmt:message key="group.edit.edit_details" /></a> <a href="group-create.jsp?group=<%= URLEncoder.encode(group.getName(), "UTF-8")%>&name=<%= URLEncoder.encode(group.getName(), "UTF-8")%>&description=<%= group.getDescription() != null? URLEncoder.encode(group.getDescription(), "UTF-8") : "" %>" class="jive-link-edit"><fmt:message key="group.edit.edit_details" /></a>
<a href="group-delete.jsp?group=<%= URLEncoder.encode(group.getName(), "UTF-8")%>" class="jive-link-delete"><fmt:message key="group.edit.delete" /></a> <a href="group-delete.jsp?group=<%= URLEncoder.encode(group.getName(), "UTF-8")%>" class="jive-link-delete"><fmt:message key="group.edit.delete" /></a>
</div> </div>
<% } %>
<h3> <h3>
<%= group.getName() %> <%= group.getName() %>
</h3> </h3>
<p> <p>
...@@ -438,11 +441,13 @@ ...@@ -438,11 +441,13 @@
<fmt:message key="group.edit.members" /> <fmt:message key="group.edit.members" />
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
<p> <% // Only show if the group isn't read-only.
if (!webManager.getGroupManager().isReadOnly()) { %>
<p>
<fmt:message key="group.edit.members_description" /> <fmt:message key="group.edit.members_description" />
</p> </p>
<form action="group-edit.jsp" method="post" name="f"> <form action="group-edit.jsp" method="post" name="f">
<input type="hidden" name="group" value="<%= groupName %>"> <input type="hidden" name="group" value="<%= groupName %>">
<input type="hidden" name="add" value="Add"/> <input type="hidden" name="add" value="Add"/>
<table cellpadding="3" cellspacing="1" border="0" style="margin: 0px 0px 8px 0px;"> <table cellpadding="3" cellspacing="1" border="0" style="margin: 0px 0px 8px 0px;">
...@@ -458,14 +463,19 @@ ...@@ -458,14 +463,19 @@
</table> </table>
</form> </form>
<form action="group-edit.jsp" method="post" name="main"> <% } %>
<form action="group-edit.jsp" method="post" name="main">
<input type="hidden" name="group" value="<%= groupName %>"> <input type="hidden" name="group" value="<%= groupName %>">
<table class="jive-table" cellpadding="3" cellspacing="0" border="0" width="435"> <table class="jive-table" cellpadding="3" cellspacing="0" border="0" width="435">
<tr> <tr>
<th>&nbsp;</th> <th>&nbsp;</th>
<th nowrap><fmt:message key="group.edit.username" /></th> <th nowrap><fmt:message key="group.edit.username" /></th>
<% // Only show if the group isn't read-only.
if (!webManager.getGroupManager().isReadOnly()) { %>
<th width="1%" nowrap class="jive-table-th-center"><fmt:message key="group.edit.admin" /></th> <th width="1%" nowrap class="jive-table-th-center"><fmt:message key="group.edit.admin" /></th>
<th width="1%" nowrap class="jive-table-th-center"><fmt:message key="group.edit.remove" /></th> <th width="1%" nowrap class="jive-table-th-center"><fmt:message key="group.edit.remove" /></th>
<% } %>
</tr> </tr>
<!-- Add admins first --> <!-- Add admins first -->
<% <%
...@@ -534,17 +544,20 @@ ...@@ -534,17 +544,20 @@
<% } else { %> <% } else { %>
<td><%= jid %><% showRemoteJIDsWarning = true; %> <font color="red"><b>*</b></font></td> <td><%= jid %><% showRemoteJIDsWarning = true; %> <font color="red"><b>*</b></font></td>
<% } %> <% } %>
<% // Only show if the group isn't read-only.
if (!webManager.getGroupManager().isReadOnly()) { %>
<td align="center"> <td align="center">
<input type="checkbox" name="admin" value="<%= jid %>" <% if (admins.contains(jid)) { %>checked<% } %>> <input type="checkbox" name="admin" value="<%= jid %>" <% if (admins.contains(jid)) { %>checked<% } %>>
</td> </td>
<td align="center"> <td align="center">
<input type="checkbox" name="delete" value="<%= jid %>"> <input type="checkbox" name="delete" value="<%= jid %>">
</td> </td>
<% } %>
</tr> </tr>
<% <%
} }
} }
if (showUpdateButtons) { if (showUpdateButtons && !webManager.getGroupManager().isReadOnly()) {
%> %>
<tr> <tr>
<td colspan="2"> <td colspan="2">
......
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