From 1987b380110e967d1dc7ad88d8462e2f2ab6aa61 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 22 Nov 2018 10:53:55 +0100 Subject: luci-app-openvpn: do not show all boolean option by default If a new instance is edit then all boolean option are shown on the LuCI. This is confusing. To fix this hide all boolean ellements on the config page which are not enabled by default. They must be add first. Signed-off-by: Florian Eckert --- applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua') diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua index cee5f9d31..3be274dc8 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua @@ -148,6 +148,8 @@ for _, option in ipairs(basicParams) do end return AbstractValue.remove(self, section) end + elseif option[1] == Flag then + o.default = nil else if option[1] == DynamicList then function o.cfgvalue(...) -- cgit v1.2.3