applications/luci-radvd: allow the special value "infinity" for preferred lifetime...
[project/luci.git] / applications / luci-radvd / luasrc / model / cbi / radvd / dnssl.lua
index fe17f0c..ec67f30 100644 (file)
@@ -90,27 +90,10 @@ end
 
 
 o = s:option(Value, "AdvDNSSLLifetime", translate("Lifetime"),
-       translate("Specifies the maximum duration how long the DNSSL entries are used for name resolution. Use 0 to specify an infinite lifetime"))
+       translate("Specifies the maximum duration how long the DNSSL entries are used for name resolution."))
 
-o.datatype = "uinteger"
+o.datatype = 'or(uinteger,"infinity")'
 o.placeholder = 1200
 
-function o.cfgvalue(self, section)
-       local v = Value.cfgvalue(self, section)
-       if v == "infinity" then
-               return 0
-       else
-               return v
-       end
-end
-
-function o.write(self, section, value)
-       if value == "0" then
-               Value.write(self, section, "infinity")
-       else
-               Value.write(self, section, value)
-       end
-end
-
 
 return m