1
0

nullsection.htm 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <div class="cbi-section">
  2. <% if self.title and #self.title > 0 then -%>
  3. <legend><%=self.title%></legend>
  4. <%- end %>
  5. <% if self.description and #self.description > 0 then -%>
  6. <div class="cbi-section-descr"><%=self.description%></div>
  7. <%- end %>
  8. <div class="cbi-section-node">
  9. <div id="cbi-<%=self.config%>-<%=tostring(self):sub(8)%>">
  10. <% self:render_children(1, scope or {}) %>
  11. </div>
  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 -%>
  15. <li>
  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!%>
  20. <%- else -%>
  21. <%=pcdata(e)%>
  22. <%- end -%>
  23. </li>
  24. <%- end %></ul>
  25. </div>
  26. <%- end %>
  27. </div>
  28. </div>
  29. <%-
  30. if type(self.hidden) == "table" then
  31. for k, v in pairs(self.hidden) do
  32. -%>
  33. <input type="hidden" id="<%=k%>" name="<%=k%>" value="<%=pcdata(v)%>" />
  34. <%-
  35. end
  36. end
  37. %>