886053b1b709a01c83a0001a760dbd11ee73bfdb
[project/luci.git] / applications / luci-ddns / luasrc / model / cbi / ddns / ddnsmini.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13 $Id$
14 ]]--
15 m = Map("ddns", translate("Dynamic DNS"), translate("Dynamic DNS allows that your router can be reached with a fixed hostname while having a dynamically changing IP-Address."))
16
17 s = m:section(TypedSection, "service", "")
18 s.addremove = true
19
20 s:option(Flag, "enabled", translate("enable"))
21
22 svc = s:option(ListValue, "service_name", translate("Service"))
23 svc.rmempty = true
24 svc:value("dyndns.org")
25 svc:value("changeip.com")
26 svc:value("zoneedit.com")
27 svc:value("no-ip.com")
28 svc:value("freedns.afraid.org")
29
30 s:option(Value, "domain", translate("Hostname")).rmempty = true
31 s:option(Value, "username", translate("Username")).rmempty = true
32 pw = s:option(Value, "password", translate("Password"))
33 pw.rmempty = true
34 pw.password = true
35
36 s.defaults.ip_source = "network"
37 s.defaults.ip_network = "wan"
38
39 s:option(Value, "check_interval", translate("Check for changed IP every")).default = 10
40 unit = s:option(ListValue, "check_unit", translate("Check-Time unit"))
41 unit.default = "minutes"
42 unit:value("minutes", "min")
43 unit:value("hours", "h")
44
45 s:option(Value, "force_interval", translate("Force update every")).default = 72
46 unit = s:option(ListValue, "force_unit", translate("Force-Time unit"))
47 unit.default = "hours"
48 unit:value("minutes", "min")
49 unit:value("hours", "h")
50
51
52 return m