1 -- Copyright 2008 Steven Barth <steven@midlink.org>
2 -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
3 -- Licensed to the public under the Apache License 2.0.
5 require("luci.tools.webadmin")
6 m = Map("ntpclient", translate("Time Synchronisation"), translate("Synchronizes the system time"))
8 s = m:section(TypedSection, "ntpclient", translate("General"))
12 s:option(DummyValue, "_time", translate("Current system time")).value = os.date("%c")
14 interval = s:option(Value, "interval", translate("Update interval (in seconds)"))
15 interval.datatype = "and(uinteger,min(1))"
16 interval.rmempty = true
18 s3 = m:section(TypedSection, "ntpserver", translate("Time Server"))
21 s3.template = "cbi/tblsection"
23 s3:option(Value, "hostname", translate("Hostname"))
24 port = s3:option(Value, "port", translate("Port"))
25 port.datatype = "port"