summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/view/cbi
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffluci/view/cbi')
-rw-r--r--src/ffluci/view/cbi/footer.htm2
-rw-r--r--src/ffluci/view/cbi/header.htm2
-rw-r--r--src/ffluci/view/cbi/map.htm8
-rw-r--r--src/ffluci/view/cbi/nsection.htm2
-rw-r--r--src/ffluci/view/cbi/tsection.htm22
5 files changed, 14 insertions, 22 deletions
diff --git a/src/ffluci/view/cbi/footer.htm b/src/ffluci/view/cbi/footer.htm
new file mode 100644
index 000000000..e8ef8fef5
--- /dev/null
+++ b/src/ffluci/view/cbi/footer.htm
@@ -0,0 +1,2 @@
+ </form>
+<%+footer%> \ No newline at end of file
diff --git a/src/ffluci/view/cbi/header.htm b/src/ffluci/view/cbi/header.htm
new file mode 100644
index 000000000..bd3607f11
--- /dev/null
+++ b/src/ffluci/view/cbi/header.htm
@@ -0,0 +1,2 @@
+<%+header%>
+ <form method="post" action="<%=os.getenv("REQUEST_URI")%>">
diff --git a/src/ffluci/view/cbi/map.htm b/src/ffluci/view/cbi/map.htm
index b724ffccb..e6884f104 100644
--- a/src/ffluci/view/cbi/map.htm
+++ b/src/ffluci/view/cbi/map.htm
@@ -1,10 +1,8 @@
- <div class="cbi-map" id="cbi-<%=self.config%>">
- <form method="post" action="<%=os.getenv("REQUEST_URI")%>">
+ <div class="cbi-map" id="cbi-<%=self.config%>">
<h1><%=self.title%></h1>
<div class="cbi-map-descr"><%=self.description%></div>
<br />
-<% for k, node in ipairs(self.children) do node:render() end %>
+<% self:render_children() %>
<br />
<input type="submit" /> <input type="reset" />
- </form>
- </div>
+ </div>
diff --git a/src/ffluci/view/cbi/nsection.htm b/src/ffluci/view/cbi/nsection.htm
index e002c68b0..84f893d2b 100644
--- a/src/ffluci/view/cbi/nsection.htm
+++ b/src/ffluci/view/cbi/nsection.htm
@@ -2,6 +2,6 @@
<h2><%=self.title%></h2>
<div class="cbi-nsection-descr"><%=self.description%></div>
<div class="cbi-nsection-options">
-<% for k, node in ipairs(self.children) do node:render() end %>
+<% self:render_children() %>
</div>
</div>
diff --git a/src/ffluci/view/cbi/tsection.htm b/src/ffluci/view/cbi/tsection.htm
index b613f6271..bd19ecf59 100644
--- a/src/ffluci/view/cbi/tsection.htm
+++ b/src/ffluci/view/cbi/tsection.htm
@@ -1,21 +1,11 @@
-<%
-local allsections = self.map:read()
-local sections = {}
-for k, v in pairs(allsections) do
- if v[".type"] == self.sectiontype then
- sections[k] = v
- end
-end
-%>
<div class="cbi-tsection" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
<h2><%=self.title%></h2>
<div class="cbi-tsection-descr"><%=self.description%></div>
-<% for k, v in pairs(sections) do %>
- <div class="cbi-tsection-node" id="cbi-<%=self.config%>-<%=k%>">
-<% for i, node in ipairs(self.children) do
- node.section = k
- node:render()
-end %>
- </div>
+<% for k, v in pairs(self:ucisections()) do%>
+ <fieldset class="cbi-tsection-node" id="cbi-<%=self.config%>-<%=k%>">
+ <% if not self.anonymous then %><legend><%=k%></legend><% end %>
+<% self:render_children(k) %>
+ </fieldset>
+ <br />
<% end %>
</div>