section.html 838 B

12345678910111213141516171819202122232425262728
  1. <fieldset class="gluon-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="gluon-section-descr"><%=self.description%></div>
  7. <%- end %>
  8. <div class="gluon-section-node">
  9. <div id="section-<%=id%>">
  10. <% self:render_children(renderer, scope) %>
  11. </div>
  12. <% if self.error and self.error[1] then -%>
  13. <div class="gluon-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. <%|e%>
  22. <%- end -%>
  23. </li>
  24. <%- end %></ul>
  25. </div>
  26. <%- end %>
  27. </div>
  28. </fieldset>