51bebb6e6649fc024a30155002d318f262ce84ec
[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("ddns"), translate("ddns_desc"))
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 s:option(Value, "password", translate("password")).rmempty = true
33
34 s.defaults.ip_source = "network"
35 s.defaults.ip_network = "wan"
36
37 s:option(Value, "check_interval").default = 10
38 unit = s:option(ListValue, "check_unit")
39 unit.default = "minutes"
40 unit:value("minutes", "min")
41 unit:value("hours", "h")
42
43 s:option(Value, "force_interval").default = 72
44 unit = s:option(ListValue, "force_unit")
45 unit.default = "hours"
46 unit:value("minutes", "min")
47 unit:value("hours", "h")
48
49
50 return m