summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-openvpn/luasrc/model
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2018-11-22 10:53:55 +0100
committerFlorian Eckert <fe@dev.tdt.de>2018-11-22 11:29:44 +0100
commit1987b380110e967d1dc7ad88d8462e2f2ab6aa61 (patch)
tree29c7ff6a44ec0deab6f53cd8900d16477476415f /applications/luci-app-openvpn/luasrc/model
parent1986dc2751517f11da943863a8cca6b3fe50be3b (diff)
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 <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-openvpn/luasrc/model')
-rw-r--r--applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua2
-rw-r--r--applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua2
2 files changed, 4 insertions, 0 deletions
diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua
index a693e0cf0c..9a37ba8022 100644
--- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua
+++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua
@@ -772,6 +772,8 @@ for _, option in ipairs(params) 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(...)
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 cee5f9d31d..3be274dc8b 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(...)