* luci/app/hd_idle: small i18n fix
[project/luci.git] / applications / luci-fw / luasrc / model / cbi / luci_fw / routing.lua
index 7ecc8224bef1928e29fadb26f0eb707c66c4db2b..f8689a05c5f4981f7c6e792152da6715f63d635b 100644 (file)
@@ -1,29 +1,30 @@
--- ToDo: Translate, Add descriptions and help texts
-require("luci.sys")
-m = Map("luci_fw", "Routing", [[An dieser Stelle wird festlegt, welcher Netzverkehr zwischen einzelnen
-Schnittstellen erlaubt werden soll. Es werden jeweils nur neue Verbindungen
-betrachtet, d.h. Pakete von aufgebauten oder zugehörigen Verbindungen werden automatisch in beide Richtungen
-akzeptiert, auch wenn das Feld "beide Richtungen" nicht explizit gesetzt ist.
-NAT ermöglicht Adressübersetzung.]])
-
-s = m:section(TypedSection, "routing", "")
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("firewall", translate("fw_forwarding"), translate("fw_forwarding1"))
+
+s = m:section(TypedSection, "forwarding", "")
 s.template  = "cbi/tblsection"
 s.addremove = true
 s.anonymous = true
 
-iface = s:option(ListValue, "iface", "Eingang", "Eingangsschnittstelle")
-oface = s:option(ListValue, "oface", "Ausgang", "Ausgangsschnittstelle")
+iface = s:option(ListValue, "src")
+oface = s:option(ListValue, "dest")
 
-luci.model.uci.foreach("network", "interface",
+luci.model.uci.cursor():foreach("firewall", "zone",
        function (section)
-               if section[".name"] ~= "loopback" then
-                       iface:value(section[".name"])
-                       oface:value(section[".name"])
-               end
+                       iface:value(section.name)
+                       oface:value(section.name)
        end)
 
-s:option(Flag, "fwd", "FWD", "weiterleiten").rmempty = true
-s:option(Flag, "nat", "NAT", "übersetzen").rmempty = true
-s:option(Flag, "bidi", "<->", "beide Richtungen").rmempty = true
-
 return m