1 <fieldset 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>
23 <fieldset class="cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id="cbi-<%=self.config%>-<%=section%>">
29 <% if isempty then -%>
30 <em><%:This section contains no values yet%><br /><br /></em>
33 <% if self.addremove then -%>
34 <% if self.template_addremove then include(self.template_addremove) else -%>
35 <div class="cbi-section-create">
36 <% if self.anonymous then -%>
37 <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" />
39 <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %>
40 <input type="text" class="cbi-section-create-name" id="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" data-type="uciname" data-optional="true" />
41 <input type="submit" class="cbi-button cbi-button-add" onclick="this.form.cbi_state='add-section'; return true" value="<%:Add%>" />
42 <% if self.invalid_cts then -%>
43 <br /><%:Invalid%></div>