modules/admin-full: hide rdate if not present in config
This commit is contained in:
parent
12f0c3cdd6
commit
9be4231a10
1 changed files with 6 additions and 9 deletions
|
@ -27,11 +27,6 @@ function m.on_parse()
|
||||||
has_rdate = true
|
has_rdate = true
|
||||||
return false
|
return false
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if not has_rdate then
|
|
||||||
m.uci:section("system", "rdate", nil, { })
|
|
||||||
m.uci:save("system")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,10 +95,12 @@ s:option(Value, "log_port", translate("External system log server port")).option
|
||||||
s:option(Value, "conloglevel", translate("Log output level")).optional = true
|
s:option(Value, "conloglevel", translate("Log output level")).optional = true
|
||||||
s:option(Value, "cronloglevel", translate("Cron Log Level")).optional = true
|
s:option(Value, "cronloglevel", translate("Cron Log Level")).optional = true
|
||||||
|
|
||||||
s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)"))
|
if has_rdate then
|
||||||
s2.anonymous = true
|
s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)"))
|
||||||
s2.addremove = false
|
s2.anonymous = true
|
||||||
|
s2.addremove = false
|
||||||
|
|
||||||
s2:option(DynamicList, "server", translate("Server"))
|
s2:option(DynamicList, "server", translate("Server"))
|
||||||
|
end
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
Loading…
Reference in a new issue