diff options
Diffstat (limited to 'applications')
4 files changed, 7 insertions, 20 deletions
diff --git a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua index 1c88579b37..a8ba0c73c5 100644 --- a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua +++ b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua @@ -12,6 +12,7 @@ You may obtain a copy of the License at $Id$ ]]-- +require("luci.tools.webadmin") m = Map("ddns", translate("ddns"), translate("ddns_desc")) s = m:section(TypedSection, "service", "") @@ -40,12 +41,7 @@ src:value("web", "URL") iface = s:option(ListValue, "ip_network", translate("network")) iface:depends("ip_source", "network") iface.rmempty = true -luci.model.uci.foreach("network", "interface", - function (section) - if section[".name"] ~= "loopback" then - iface:value(section[".name"]) - end - end) +luci.tools.webadmin.cbi_add_networks(iface) iface = s:option(ListValue, "ip_interface", translate("interface")) iface:depends("ip_source", "interface") diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua index 1a765abb74..3ef3275cad 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua @@ -11,6 +11,7 @@ You may obtain a copy of the License at $Id$ ]]-- +require("luci.tools.webadmin") m = Map("firewall", translate("fw_fw"), translate("fw_fw1")) s = m:section(TypedSection, "defaults") @@ -52,12 +53,7 @@ s:option(Flag, "masq") net = s:option(MultiValue, "network") net.widget = "select" net.rmempty = true -luci.model.uci.foreach("network", "interface", - function (section) - if section[".name"] ~= "loopback" then - net:value(section[".name"]) - end - end) +luci.tools.webadmin.cbi_add_networks(net) function net.cfgvalue(self, section) local value = MultiValue.cfgvalue(self, section) diff --git a/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua b/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua index c57d3c8cb7..824b2b513f 100644 --- a/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua +++ b/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua @@ -11,6 +11,7 @@ You may obtain a copy of the License at $Id$ ]]-- +require("luci.tools.webadmin") require("luci.fs") m = Map("olsr", "OLSR") @@ -85,13 +86,7 @@ i.addremove = true i.dynamic = true network = i:option(ListValue, "Interface", translate("network")) -network:value("") -luci.model.uci.foreach("network", "interface", - function (section) - if section[".name"] ~= "loopback" then - network:value(section[".name"]) - end - end) +luci.tools.webadmin.cbi_add_networks(network) i:option(Value, "Ip4Broadcast") i:option(Value, "HelloInterval") diff --git a/applications/luci-samba/luasrc/model/cbi/samba.lua b/applications/luci-samba/luasrc/model/cbi/samba.lua index 3fe7006e3e..7ef9d239b2 100644 --- a/applications/luci-samba/luasrc/model/cbi/samba.lua +++ b/applications/luci-samba/luasrc/model/cbi/samba.lua @@ -30,7 +30,7 @@ s.addremove = true s.template = "cbi/tblsection" s:option(Value, "name", translate("name")) -s:option(Value, "path") +s:option(Value, "path").titleref = luci.dispatcher.build_url("admin", "system", "fstab") s:option(Value, "users").rmempty = true |