X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_system%2Fsystem.lua;h=f6826c090b998da8f2667692319051e2ebaee1af;hb=819fa18e163ab4f29f5978be80f892b6c883e518;hp=a0b8844f3b004a78c9bc8e2e53301e6409979a05;hpb=408a58f6f6b0d419bc6b81eb93f32c701e19118a;p=project%2Fluci.git 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