X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-radvd%2Fluasrc%2Fmodel%2Fcbi%2Fradvd%2Froute.lua;h=37fac576b437caf688d73257d7a2eef0022be9f6;hb=a3c3168b1c4941e91c5cb3b5572a93f6dee8edec;hp=6e84d0fb2598b199f8d37a374b34df0c2fc0b906;hpb=1db135a32f73ce9445f8f498123dbb632f4b5bca;p=project%2Fluci.git diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua b/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua index 6e84d0fb2..37fac576b 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua @@ -13,6 +13,7 @@ $Id$ ]]-- local sid = arg[1] +local utl = require "luci.util" m = Map("radvd", translatef("Radvd - Route"), translate("Radvd is a router advertisement daemon for IPv6. " .. @@ -72,11 +73,20 @@ function o.write(self, section, value) end -o = s:option(Value, "prefix", translate("Prefix"), - translate("Advertised IPv6 prefix")) +o = s:option(DynamicList, "prefix", translate("Prefixes"), + translate("Advertised IPv6 prefixes")) -o.rmempty = false -o.datatype = "ip6addr" +o.rmempty = false +o.datatype = "ip6addr" +o.placeholder = translate("default") +function o.cfgvalue(self, section) + local l = { } + local v = m.uci:get_list("radvd", section, "prefix") + for v in utl.imatch(v) do + l[#l+1] = v + end + return l +end o = s:option(Value, "AdvRouteLifetime", translate("Lifetime"),