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 <div class=
"cbi-section-descr"><%=self.description%
></div>
6 <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%
>
7 <% if self.addremove then -%
>
8 <div class=
"cbi-section-remove right">
9 <input type=
"submit" name=
"cbi.rts.<%=self.config%>.<%=k%>" onclick=
"this.form.cbi_state='del-section'; return true" value=
"<%:Delete%>" class=
"cbi-button" />
13 <%- section = k; isempty = false -%
>
15 <% if not self.anonymous then -%
>
16 <h3><%=section:upper()%
></h3>
21 <fieldset class=
"cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id=
"cbi-<%=self.config%>-<%=section%>">
27 <% if isempty then -%
>
28 <em><%:This section contains no values yet%
><br /><br /></em>
31 <% if self.addremove then -%
>
32 <% if self.template_addremove then include(self.template_addremove) else -%
>
33 <div class=
"cbi-section-create">
34 <% if self.anonymous then -%
>
35 <input type=
"submit" class=
"cbi-button cbi-button-add" name=
"cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value=
"<%:Add%>" />
37 <% if self.invalid_cts then -%
><div class=
"cbi-section-error"><% end %
>
38 <input type=
"text" class=
"cbi-section-create-name" id=
"cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" name=
"cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" />
39 <script type=
"text/javascript">cbi_validate_field('cbi.cts.<%=self.config%
>.<%=self.sectiontype%
>.<%=section%
>', true, 'uciname');
</script>
40 <input type=
"submit" class=
"cbi-button cbi-button-add" onclick=
"this.form.cbi_state='add-section'; return true" value=
"<%:Add%>" />
41 <% if self.invalid_cts then -%
>
42 <br /><%:Invalid%
></div>