1 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
2 <% if self.title and #self.title > 0 then -%>
3 <legend><%=self.title%></legend>
5 <% if self.description and #self.description > 0 then -%>
6 <div class="cbi-section-descr"><%=self.description%></div>
8 <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%>
9 <% if self.addremove then -%>
10 <div class="cbi-section-remove right">
11 <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" onclick="this.form.cbi_state='del-section'; return true" value="<%:Delete%>" class="cbi-button" />
15 <%- section = k; isempty = false -%>
17 <% if not self.anonymous then -%>
18 <h3><%=section:upper()%></h3>
21 <div class="cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id="cbi-<%=self.config%>-<%=section%>">
26 <% if isempty then -%>
27 <em><%:This section contains no values yet%><br /><br /></em>
30 <% if self.addremove then -%>
31 <% if self.template_addremove then include(self.template_addremove) else -%>
32 <div class="cbi-section-create">
33 <% if self.anonymous then -%>
34 <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" />
36 <% if self.invalid_cts then -%>
37 <div class="cbi-section-error"><%:Invalid%></div>
40 <input type="text" class="cbi-section-create-name" id="cbi.cts.<%=self.config%>.<%=self.sectiontype%>." name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>." data-type="uciname" data-optional="true" />
42 <input class="cbi-button cbi-button-add" type="submit" onclick="this.form.cbi_state='add-section'; return true" value="<%:Add%>" title="<%:Add%>" />