summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua8
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua8
-rw-r--r--applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua9
-rw-r--r--applications/luci-samba/luasrc/model/cbi/samba.lua2
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 1c88579b3..a8ba0c73c 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 1a765abb7..3ef3275ca 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 c57d3c8cb..824b2b513 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 3fe7006e3..7ef9d239b 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