2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
16 <fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
17 <% if self.title and #self.title > 0 then -%>
18 <legend><%=self.title%></legend>
20 <div class="cbi-section-descr"><%=self.description%></div>
21 <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%>
22 <% if self.addremove then -%>
23 <div class="cbi-section-remove right">
24 <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" value="<%:Delete%>" />
28 <%- section = k; isempty = false -%>
30 <% if not self.anonymous then -%>
31 <h3><%=section:upper()%></h3>
36 <fieldset class="cbi-section-node" id="cbi-<%=self.config%>-<%=section%>">
42 <% if isempty then -%>
43 <em><%:This section contains no values yet%><br /><br /></em>
46 <% if self.addremove then -%>
47 <% if self.template_addremove then include(self.template_addremove) else -%>
48 <div class="cbi-section-create">
49 <% if self.anonymous then -%>
50 <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" value="<%:Add%>" />
52 <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %>
53 <input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
54 <input type="submit" class="cbi-button cbi-button-add" value="<%:Add%>" />
55 <% if self.invalid_cts then -%>
56 <br /><%:Invalid%></div>