Update my email addresses in the license headers
[project/luci.git] / applications / luci-app-ntpc / luasrc / model / cbi / ntpc / ntpcmini.lua
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.
4
5 require("luci.tools.webadmin")
6 m = Map("ntpclient", translate("Time Synchronisation"), translate("Synchronizes the system time"))
7
8 s = m:section(TypedSection, "ntpclient", translate("General"))
9 s.anonymous = true
10 s.addremove = false
11
12 s:option(DummyValue, "_time", translate("Current system time")).value = os.date("%c")
13
14 interval = s:option(Value, "interval", translate("Update interval (in seconds)"))
15 interval.datatype = "and(uinteger,min(1))"
16 interval.rmempty = true
17
18 s3 = m:section(TypedSection, "ntpserver", translate("Time Server"))
19 s3.anonymous = true
20 s3.addremove = true
21 s3.template = "cbi/tblsection"
22
23 s3:option(Value, "hostname", translate("Hostname"))
24 port = s3:option(Value, "port", translate("Port"))
25 port.datatype = "port"
26 port.rmempty = true
27
28 return m