From 3159c519b1de0ed73277f9f84a385b8da890298d Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 21 Feb 2018 12:54:56 +0000 Subject: [PATCH] Console: Hide options on /configupdate if a package (ticket #2172) or if not advanced --- .../src/net/i2p/router/web/ConfigUpdateHandler.java | 10 ++++++---- apps/routerconsole/jsp/configupdate.jsp | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java index 4e89810ff..ca1489328 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java @@ -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); diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index ebc9e26ec..d23b4616c 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -45,16 +45,18 @@ <%=formhandler._t("Update policy")%>: <% } // if canInstall %> + <% if (updatehelper.isAdvanced()) { %> + <% if (updatehelper.canInstall()) { %> - <% if (updatehelper.isAdvanced()) { %> + <% } // if canInstall %> <%=intl._t("eepProxy host")%>: " /> <%=intl._t("eepProxy port")%>: " /> - <% } // if isAdvanced %> + <% } // if isAdvanced %> <% if (updatehelper.canInstall()) { %> <% if (updatehelper.isAdvanced()) { %> <%=intl._t("Update URLs")%>: