mirror of
https://github.com/openwrt/luci.git
synced 2026-04-15 10:51:51 +00:00
Fix behaviour of dynamicdhcp field (thanks to Fabio Mercuri)
This commit is contained in:
@@ -45,7 +45,11 @@ s:option(Value, "limit", translate("limit")).rmempty = true
|
||||
|
||||
s:option(Value, "leasetime").rmempty = true
|
||||
|
||||
s:option(Flag, "dynamicdhcp").rmempty = true
|
||||
local dd = s:option(Flag, "dynamicdhcp")
|
||||
dd.rmempty = false
|
||||
function dd.cfgvalue(self, section)
|
||||
return Flag.cfgvalue(self, section) or "1"
|
||||
end
|
||||
|
||||
s:option(Value, "name", translate("name")).optional = true
|
||||
|
||||
@@ -65,4 +69,4 @@ for i, n in ipairs(s.children) do
|
||||
end
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
||||
|
||||
Reference in New Issue
Block a user