Console: Hide options on /configupdate if a package (ticket #2172)

or if not advanced
This commit is contained in:
zzz
2018-02-21 12:54:56 +00:00
parent f00bf7d2cb
commit 3159c519b1
2 changed files with 10 additions and 6 deletions

View File

@ -238,11 +238,13 @@ public class ConfigUpdateHandler extends FormHandler {
}
}
changes.put(PROP_SHOULD_PROXY, Boolean.toString(_updateThroughProxy));
changes.put(PROP_SHOULD_PROXY_NEWS, Boolean.toString(_newsThroughProxy));
if (isAdvanced()) {
changes.put(PROP_UPDATE_UNSIGNED, Boolean.toString(_updateUnsigned));
changes.put(PROP_UPDATE_DEV_SU3, Boolean.toString(_updateDevSU3));
changes.put(PROP_SHOULD_PROXY_NEWS, Boolean.toString(_newsThroughProxy));
if (!_context.getBooleanProperty(PROP_UPDATE_DISABLED)) {
changes.put(PROP_SHOULD_PROXY, Boolean.toString(_updateThroughProxy));
changes.put(PROP_UPDATE_UNSIGNED, Boolean.toString(_updateUnsigned));
changes.put(PROP_UPDATE_DEV_SU3, Boolean.toString(_updateDevSU3));
}
}
String oldFreqStr = _context.getProperty(PROP_REFRESH_FREQUENCY, DEFAULT_REFRESH_FREQUENCY);

View File

@ -45,16 +45,18 @@
<tr><td align="right"><b><%=formhandler._t("Update policy")%>:</b></td>
<td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" /></td></tr>
<% } // if canInstall %>
<% if (updatehelper.isAdvanced()) { %>
<tr><td align="right"><label for="newsThroughProxy"><b><%=intl._t("Fetch news through the eepProxy?")%></b></label></td>
<td><jsp:getProperty name="updatehelper" property="newsThroughProxy" /></td></tr>
<% if (updatehelper.canInstall()) { %>
<tr><td align="right"><b><label for="updateThroughProxy"><%=intl._t("Update through the eepProxy?")%></b></label></td>
<td><jsp:getProperty name="updatehelper" property="updateThroughProxy" /></td></tr>
<% if (updatehelper.isAdvanced()) { %>
<% } // if canInstall %>
<tr><td align="right"><b><%=intl._t("eepProxy host")%>:</b></td>
<td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" /></td>
</tr><tr><td align="right"><b><%=intl._t("eepProxy port")%>:</b></td>
<td><input type="text" size="10" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" /></td></tr>
<% } // if isAdvanced %>
<% } // if isAdvanced %>
<% if (updatehelper.canInstall()) { %>
<% if (updatehelper.isAdvanced()) { %>
<tr><td align="right"><b><%=intl._t("Update URLs")%>:</b></td>