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>
This commit is contained in:
Florian Eckert 2018-11-22 10:53:55 +01:00
parent 1986dc2751
commit 1987b38011
2 changed files with 4 additions and 0 deletions

View file

@ -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(...)

View file

@ -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(...)