summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-12-01 20:03:13 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-12-01 20:03:13 +0000
commit9be4231a10d6482282ed7f290b9b30ec49558d1a (patch)
treeba076a1ff2286e083470c590da28f6674cd5bb3a
parent12f0c3cdd6336e79360846bd233189f2cd281fce (diff)
modules/admin-full: hide rdate if not present in config
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_system/system.lua15
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
index 891e48ea8c..f30443768a 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
@@ -27,11 +27,6 @@ function m.on_parse()
has_rdate = true
return false
end)
-
- if not has_rdate then
- m.uci:section("system", "rdate", nil, { })
- m.uci:save("system")
- 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, "cronloglevel", translate("Cron Log Level")).optional = true
-s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)"))
-s2.anonymous = true
-s2.addremove = false
+if has_rdate then
+ s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)"))
+ s2.anonymous = true
+ s2.addremove = false
-s2:option(DynamicList, "server", translate("Server"))
+ s2:option(DynamicList, "server", translate("Server"))
+end
return m