* Prepare german translation cleanup
[project/luci.git] / applications / luci-fw / luasrc / model / cbi / luci_fw / routing.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14 m = Map("luci_fw", translate("fw_routing"), translate("fw_routing1"))
15
16 s = m:section(TypedSection, "routing", "")
17 s.template  = "cbi/tblsection"
18 s.addremove = true
19 s.anonymous = true
20
21 iface = s:option(ListValue, "iface")
22 oface = s:option(ListValue, "oface")
23
24 luci.model.uci.foreach("network", "interface",
25         function (section)
26                 if section[".name"] ~= "loopback" then
27                         iface:value(section[".name"])
28                         oface:value(section[".name"])
29                 end
30         end)
31
32 s:option(Flag, "fwd", "FWD").rmempty = true
33 s:option(Flag, "nat", "NAT").rmempty = true
34 s:option(Flag, "bidi", "<->").rmempty = true
35
36 return m