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

Disabled deleting groups when read only.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5782 b35dd754-fafc-0310-a699-88a17e54d16e
parent 242f6cb8
......@@ -149,6 +149,7 @@
## Added key: 'setup.ldap.user.test.error-loading-users'
## Added key: 'setup.ldap.user.test.users-not-found'
## Added key: 'setup.ldap.user.test.internal-server-error'
## Added key: 'group.read_only'
# Wildfire
......@@ -566,6 +567,9 @@ error.serverdown.is_down=is currently down. To continue:
error.serverdown.start=Start the server.
error.serverdown.login=Login to the admin console
# General group settings.
group.read_only=Not allowed: the group account system is read-only.
# Group create Page
group.create.title=Create Group
......
......@@ -10,7 +10,6 @@
--%>
<%@ page import="org.jivesoftware.util.*,
org.jivesoftware.admin.*,
org.jivesoftware.wildfire.group.Group,
java.net.URLEncoder"
errorPage="error.jsp"
......@@ -55,6 +54,12 @@
</head>
<body>
<% if (webManager.getGroupManager().isReadOnly()) { %>
<div class="error">
<fmt:message key="user.read_only"/>
</div>
<% } %>
<p>
<fmt:message key="group.delete.hint_info" />
<b><a href="group-edit.jsp?group=<%= URLEncoder.encode(group.getName(), "UTF-8")%>"><%= group.getName() %></a></b>
......@@ -67,5 +72,19 @@
<input type="submit" name="cancel" value="<fmt:message key="global.cancel" />">
</form>
<% // Disable the form if a read-only user provider.
if (webManager.getGroupManager().isReadOnly()) { %>
<script language="Javascript" type="text/javascript">
function disable() {
var limit = document.forms[0].elements.length;
for (i=0;i<limit;i++) {
document.forms[0].elements[i].disabled = true;
}
}
disable();
</script>
<% } %>
</body>
</html>
\ No newline at end of file
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