Commit 3a5b6e5c authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Update manage updates to allow notifications for admins.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4178 b35dd754-fafc-0310-a699-88a17e54d16e
parent f5025733
......@@ -17,8 +17,8 @@
org.jivesoftware.wildfire.update.UpdateManager,
java.util.HashMap,
java.util.Map"
errorPage="error.jsp"
%>
errorPage="error.jsp"
%>
<html>
......@@ -31,8 +31,8 @@
<% // Get parameters
boolean update = request.getParameter("update") != null;
boolean notificationUpdate = request.getParameter("notificationUpdate") != null;
boolean serviceEnabled = ParamUtils.getBooleanParameter(request,"serviceEnabled");
boolean notificationsEnabled = ParamUtils.getBooleanParameter(request,"notificationsEnabled");
boolean serviceEnabled = ParamUtils.getBooleanParameter(request, "serviceEnabled");
boolean notificationsEnabled = ParamUtils.getBooleanParameter(request, "notificationsEnabled");
boolean updateSucess = false;
UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager();
......@@ -42,9 +42,6 @@
if (update) {
updateManager.setServiceEnabled(serviceEnabled);
updateSucess = true;
}
if (notificationUpdate) {
updateManager.setNotificationEnabled(notificationsEnabled);
updateSucess = true;
}
......@@ -64,31 +61,15 @@
<% if (!errors.isEmpty()) { %>
<div class="jive-error">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16" border="0"/></td>
<td class="jive-icon-label">
</td>
</tr>
</tbody>
</table>
<div class="error">
</div>
<br>
<% } else if (updateSucess) { %>
<% }
else if (updateSucess) { %>
<div class="jive-success">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0"></td>
<td class="jive-icon-label">
<fmt:message key="manage-updates.config.updated" />
</td></tr>
</tbody>
</table>
<div class="success">
<fmt:message key="manage-updates.config.updated"/>
</div><br>
<% } %>
......@@ -96,68 +77,61 @@
<form action="manage-updates.jsp" method="post">
<fieldset>
<legend><fmt:message key="manage-updates.enabled.legend" /></legend>
<div>
<legend><fmt:message key="manage-updates.enabled.legend"/></legend>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="serviceEnabled" value="false" id="rb01"
<%= (!serviceEnabled ? "checked" : "") %>>
<%= (!serviceEnabled ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01">
<b><fmt:message key="manage-updates.label_disable" /></b> - <fmt:message key="manage-updates.label_disable_info" />
<b><fmt:message key="manage-updates.label_disable"/></b> - <fmt:message key="manage-updates.label_disable_info"/>
</label>
</td>
</tr>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="serviceEnabled" value="true" id="rb02"
<%= (serviceEnabled ? "checked" : "") %>>
<%= (serviceEnabled ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02">
<b><fmt:message key="manage-updates.label_enable" /></b> - <fmt:message key="manage-updates.label_enable_info" />
<b><fmt:message key="manage-updates.label_enable"/></b> - <fmt:message key="manage-updates.label_enable_info"/>
</label>
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
<br>
<input type="submit" name="update" value="<fmt:message key="global.save_settings" />">
</form>
<br>
<fieldset>
<legend><fmt:message key="manage-updates.notif.enabled.legend" /></legend>
</fieldset>
<br/><br/>
<fieldset>
<legend><fmt:message key="manage-updates.notif.enabled.legend"/></legend>
<div>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="notificationsEnabled" value="false" id="rb01"
<%= (!notificationsEnabled ? "checked" : "") %>>
<%= (!notificationsEnabled ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01">
<b><fmt:message key="manage-updates.notif.label_disable" /></b> - <fmt:message key="manage-updates.notif.label_disable_info" />
<b><fmt:message key="manage-updates.notif.label_disable"/></b> - <fmt:message key="manage-updates.notif.label_disable_info"/>
</label>
</td>
</tr>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="notificationsEnabled" value="true" id="rb02"
<%= (notificationsEnabled ? "checked" : "") %>>
<%= (notificationsEnabled ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02">
<b><fmt:message key="manage-updates.notif.label_enable" /></b> - <fmt:message key="manage-updates.notif.label_enable_info" />
<b><fmt:message key="manage-updates.notif.label_enable"/></b> - <fmt:message key="manage-updates.notif.label_enable_info"/>
</label>
</td>
</tr>
......@@ -167,7 +141,11 @@
</fieldset>
<br>
<input type="submit" name="notificationUpdate" value="<fmt:message key="global.save_settings" />">
<input type="submit" name="update" value="<fmt:message key="global.save_settings" />">
</form>
</body>
</html>
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