1 <fieldset class="cbi-section">
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 <div class="cbi-section-node">
9 <div id="cbi-<%=self.config%>-<%=tostring(self):sub(8)%>">
10 <% self:render_children(1, scope or {}) %>
12 <% if self.error and self.error[1] then -%>
13 <div class="cbi-section-error">
14 <ul><% for _, e in ipairs(self.error[1]) do -%>
16 <%- if e == "invalid" then -%>
17 <%:One or more fields contain invalid values!%>
18 <%- elseif e == "missing" then -%>
19 <%:One or more required fields have no value!%>
31 if type(self.hidden) == "table" then
32 for k, v in pairs(self.hidden) do
34 <input type="hidden" id="<%=k%>" name="<%=k%>" value="<%=pcdata(v)%>" />