diff options
author | Manuel Munz <freifunk@somakoma.de> | 2011-02-12 19:10:19 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2011-02-12 19:10:19 +0000 |
commit | 819fa18e163ab4f29f5978be80f892b6c883e518 (patch) | |
tree | 4bb268ac5ca52c9a2c161d2a4c2ad6b88bf60bf9 | |
parent | 094e2c8c815fe2eea83b9ab99ec3a63e753994fb (diff) |
modules/admin-full: Switch to the new rdate timeserver config in /etc/config/timeserver (#132)
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_system/system.lua | 25 |
1 files changed, 19 insertions, 6 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 a0b8844f3..f6826c090 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua @@ -184,11 +184,24 @@ end -- 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")) + m3= Map("timeserver", translate("Time Server (rdate)")) + s = m3:section(TypedSection, "timeserver") + s.anonymous = true + s.addremove = true + s.template = "cbi/tblsection" + s.rmempty = true + + s:option(Value, "hostname", translate("Name")) + i = s:option(ListValue, "interface", translate("Interface")) + i:value("", translate("Default")) + m3.uci:foreach("network", "interface", + function (section) + local ifc = section[".name"] + if ifc ~= "loopback" then + i:value(ifc) + end + end + ) end @@ -249,4 +262,4 @@ c.write = function(self, section, value) end -return m, m2 +return m, m3, m2 |