diff --git a/applications/luci-fw/src/model/cbi/admin_network/portfw.lua b/applications/luci-fw/src/model/cbi/admin_network/portfw.lua
index 96822b53a2..5ee22336e7 100644
--- a/applications/luci-fw/src/model/cbi/admin_network/portfw.lua
+++ b/applications/luci-fw/src/model/cbi/admin_network/portfw.lua
@@ -4,10 +4,11 @@ m = Map("luci_fw", "Portweiterleitung", [[Portweiterleitungen ermöglichen es in
Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]])
s = m:section(TypedSection, "portfw")
+s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
-iface = s:option(ListValue, "iface", "Externes Interface")
+iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
iface:value("")
for k,v in pairs(ffluci.sys.net.devices()) do
iface:value(v)
diff --git a/core/src/cbi.lua b/core/src/cbi.lua
index 3384e5c38a..8a623b62c9 100644
--- a/core/src/cbi.lua
+++ b/core/src/cbi.lua
@@ -87,8 +87,11 @@ function Node.parse(self, ...)
end
-- Render this node
-function Node.render(self)
- ffluci.template.render(self.template, {self=self})
+function Node.render(self, scope)
+ scope = scope or {}
+ scope.self = self
+
+ ffluci.template.render(self.template, scope)
end
-- Render the children
@@ -453,13 +456,6 @@ function TypedSection.parse(self)
end
end
--- Render the children
-function TypedSection.render_children(self, section)
- for k, node in ipairs(self.children) do
- node:render(section)
- end
-end
-
-- Verifies scope of sections
function TypedSection.checkscope(self, section)
-- Check if we are not excluded
@@ -554,9 +550,11 @@ function AbstractValue.parse(self, section)
end
-- Render if this value exists or if it is mandatory
-function AbstractValue.render(self, s)
+function AbstractValue.render(self, s, scope)
if not self.optional or self:cfgvalue(s) or self:formcreated(s) then
- ffluci.template.render(self.template, {self=self, section=s})
+ scope = scope or {}
+ scope.section = s
+ Node.render(self, scope)
end
end
diff --git a/core/src/view/cbi/nsection.htm b/core/src/view/cbi/nsection.htm
index bbc87f1858..fff597ad06 100644
--- a/core/src/view/cbi/nsection.htm
+++ b/core/src/view/cbi/nsection.htm
@@ -6,7 +6,10 @@ section = self.section %>
<% if self.addremove then %>
<% end %>
+
<%+cbi/ucisection%>
+
+
<% elseif self.addremove then %>
diff --git a/core/src/view/cbi/tblsection.htm b/core/src/view/cbi/tblsection.htm
new file mode 100644
index 0000000000..df16efbed0
--- /dev/null
+++ b/core/src/view/cbi/tblsection.htm
@@ -0,0 +1,39 @@
+
+
<%=self.title%>
+
<%=self.description%>
+
+
+<% for i, k in pairs(self.children) do %>
+
<%=k.title%>
+<% end %>
+
+
+<% for i, k in pairs(self.children) do %>
+
<%=k.description%>
+<% end %>
+
+<% for i, k in ipairs(self:cfgsections()) do%>
+ <% if not self.anonymous then %>
<%=k%>
<% end %>
+<%
+section = k
+scope = {valueheader = "cbi/tiny_valueheader", valuefooter = "cbi/tiny_valuefooter"}
+%>
+
+<%+cbi/ucisection%>
+ <% if self.addremove then %>
+
+
<% end %>
+
+<% end %>
+<% if self.addremove then %>
+
+ <% if self.anonymous then %>
+
+ <% else %>
+
+
+ <% end %><% if self.err_invalid then %>