summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/cbi/tsection.htm
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-12-03 15:17:05 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-08 16:26:20 +0100
commit1bb4822dca6113f73e3bc89e2acf15935e6f8e92 (patch)
tree35e16f100466e4e00657199b38bb3d87d52bf73f /modules/luci-base/luasrc/view/cbi/tsection.htm
parent9edd0e46c3f880727738ce8ca6ff1c8b85f99ef4 (diff)
Rework LuCI build system
* Rename subdirectories to their repective OpenWrt package names * Make each LuCI module its own standalone package * Deploy a shared luci.mk which is used by each module Makefile Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi/tsection.htm')
-rw-r--r--modules/luci-base/luasrc/view/cbi/tsection.htm48
1 files changed, 48 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/tsection.htm b/modules/luci-base/luasrc/view/cbi/tsection.htm
new file mode 100644
index 000000000..087548bf2
--- /dev/null
+++ b/modules/luci-base/luasrc/view/cbi/tsection.htm
@@ -0,0 +1,48 @@
+<fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
+ <% if self.title and #self.title > 0 then -%>
+ <legend><%=self.title%></legend>
+ <%- end %>
+ <div class="cbi-section-descr"><%=self.description%></div>
+ <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%>
+ <% if self.addremove then -%>
+ <div class="cbi-section-remove right">
+ <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" onclick="this.form.cbi_state='del-section'; return true" value="<%:Delete%>" class="cbi-button" />
+ </div>
+ <%- end %>
+
+ <%- section = k; isempty = false -%>
+
+ <% if not self.anonymous then -%>
+ <h3><%=section:upper()%></h3>
+ <%- end %>
+
+ <%+cbi/tabmenu%>
+
+ <fieldset class="cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id="cbi-<%=self.config%>-<%=section%>">
+ <%+cbi/ucisection%>
+ </fieldset>
+ <br />
+ <%- end %>
+
+ <% if isempty then -%>
+ <em><%:This section contains no values yet%><br /><br /></em>
+ <%- end %>
+
+ <% if self.addremove then -%>
+ <% if self.template_addremove then include(self.template_addremove) else -%>
+ <div class="cbi-section-create">
+ <% if self.anonymous then -%>
+ <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" />
+ <%- else -%>
+ <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %>
+ <input type="text" class="cbi-section-create-name" id="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" />
+ <script type="text/javascript">cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>', true, 'uciname');</script>
+ <input type="submit" class="cbi-button cbi-button-add" onclick="this.form.cbi_state='add-section'; return true" value="<%:Add%>" />
+ <% if self.invalid_cts then -%>
+ <br /><%:Invalid%></div>
+ <%- end %>
+ <%- end %>
+ </div>
+ <%- end %>
+ <%- end %>
+</fieldset>