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.error_msg and #self.error_msg
> 0 then -%
>
6 <div class=
"cbi-section-error">
10 <% if self.description and #self.description
> 0 then -%
>
11 <div class=
"cbi-section-descr"><%=self.description%
></div>
13 <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%
>
14 <% if self.addremove then -%
>
15 <div class=
"cbi-section-remove right">
16 <input type=
"submit" name=
"cbi.rts.<%=self.config%>.<%=k%>" onclick=
"this.form.cbi_state='del-section'; return true" value=
"<%:Delete%>" class=
"cbi-button" />
20 <%- section = k; isempty = false -%
>
22 <% if not self.anonymous then -%
>
23 <h3><%=section:upper()%
></h3>
26 <div class=
"cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id=
"cbi-<%=self.config%>-<%=section%>">
31 <% if isempty then -%
>
32 <em><%:This section contains no values yet%
><br /><br /></em>
35 <% if self.addremove then -%
>
36 <% if self.template_addremove then include(self.template_addremove) else -%
>
37 <div class=
"cbi-section-create">
38 <% if self.anonymous then -%
>
39 <input type=
"submit" class=
"cbi-button cbi-button-add" name=
"cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value=
"<%:Add%>" />
41 <% if self.invalid_cts then -%
>
42 <div class=
"cbi-section-error"><%:Invalid%
></div>
45 <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" />
47 <input class=
"cbi-button cbi-button-add" type=
"submit" onclick=
"this.form.cbi_state='add-section'; return true" value=
"<%:Add%>" title=
"<%:Add%>" />