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