summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-ddns/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-04-03 13:54:51 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-04-03 13:54:51 +0000
commit4344b64f3427582de2d036b4c61fcaaa420adc03 (patch)
tree6cff9ee046c040f6c8444c393d896b5ead5e3f70 /applications/luci-ddns/luasrc
parent0e1a4ca16059c3d1439bc389e3fb00aff5c81ad2 (diff)
applications/luci-ddns: make update url depend on custom service entry
Diffstat (limited to 'applications/luci-ddns/luasrc')
-rw-r--r--applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
index ada0ee12c..2870683e6 100644
--- a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
+++ b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
@@ -24,7 +24,7 @@ s.anonymous = false
s:option(Flag, "enabled", translate("enable"))
-svc = s:option(Value, "service_name", translate("Service"))
+svc = s:option(ListValue, "service_name", translate("Service"))
svc.rmempty = true
local services = { }
@@ -44,6 +44,8 @@ for _, v in luci.util.vspairs(services) do
svc:value(v)
end
+svc:value("", translate("-- custom --"))
+
s:option(Value, "domain", translate("Hostname")).rmempty = true
s:option(Value, "username", translate("Username")).rmempty = true
@@ -78,10 +80,11 @@ else
web = s:option(Value, "ip_url", "URL")
web:depends("ip_source", "web")
web.rmempty = true
-
- s:option(Value, "update_url", translate("Custom Update-URL")).optional = true
end
+url = s:option(Value, "update_url", translate("Custom Update-URL"))
+url:depends("service_name", "")
+url.rmempty = true
s:option(Value, "check_interval", translate("Check for changed IP every")).default = 10
unit = s:option(ListValue, "check_unit", translate("Check-Time unit"))