12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
- <% if self.title and #self.title > 0 then -%>
- <legend><%=self.title%></legend>
- <%- end %>
- <% if self.description and #self.description > 0 then -%>
- <div class="cbi-section-descr"><%=self.description%></div>
- <%- end %>
- <% 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%>" data-type="uciname" data-optional="true" />
- <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>
|