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:
parent
1986dc2751
commit
1987b38011
2 changed files with 4 additions and 0 deletions
|
@ -772,6 +772,8 @@ for _, option in ipairs(params) do
|
||||||
end
|
end
|
||||||
return AbstractValue.remove(self, section)
|
return AbstractValue.remove(self, section)
|
||||||
end
|
end
|
||||||
|
elseif option[1] == Flag then
|
||||||
|
o.default = nil
|
||||||
else
|
else
|
||||||
if option[1] == DynamicList then
|
if option[1] == DynamicList then
|
||||||
function o.cfgvalue(...)
|
function o.cfgvalue(...)
|
||||||
|
|
|
@ -148,6 +148,8 @@ for _, option in ipairs(basicParams) do
|
||||||
end
|
end
|
||||||
return AbstractValue.remove(self, section)
|
return AbstractValue.remove(self, section)
|
||||||
end
|
end
|
||||||
|
elseif option[1] == Flag then
|
||||||
|
o.default = nil
|
||||||
else
|
else
|
||||||
if option[1] == DynamicList then
|
if option[1] == DynamicList then
|
||||||
function o.cfgvalue(...)
|
function o.cfgvalue(...)
|
||||||
|
|
Loading…
Reference in a new issue