2020-05-08 23:12:51 +00:00
|
|
|
<fieldset class="gluon-section" id="<%=id%>" data-index="<%=self.index%>"<%= attr("data-depends", self:deplist()) %>>
|
2017-02-08 21:14:30 +00:00
|
|
|
<% if self.title and #self.title > 0 then -%>
|
2018-02-23 19:05:07 +00:00
|
|
|
<legend><%|self.title%></legend>
|
2017-02-08 21:14:30 +00:00
|
|
|
<%- end %>
|
|
|
|
<% if self.description and #self.description > 0 then -%>
|
|
|
|
<div class="gluon-section-descr"><%=self.description%></div>
|
|
|
|
<%- end %>
|
|
|
|
<div class="gluon-section-node">
|
|
|
|
<div id="section-<%=id%>">
|
|
|
|
<% self:render_children(renderer, scope) %>
|
|
|
|
</div>
|
|
|
|
<% if self.error and self.error[1] then -%>
|
|
|
|
<div class="gluon-section-error">
|
|
|
|
<ul><% for _, e in ipairs(self.error[1]) do -%>
|
|
|
|
<li>
|
|
|
|
<%- if e == "invalid" then -%>
|
|
|
|
<%:One or more fields contain invalid values!%>
|
|
|
|
<%- elseif e == "missing" then -%>
|
|
|
|
<%:One or more required fields have no value!%>
|
|
|
|
<%- else -%>
|
2018-02-23 19:05:07 +00:00
|
|
|
<%|e%>
|
2017-02-08 21:14:30 +00:00
|
|
|
<%- end -%>
|
|
|
|
</li>
|
|
|
|
<%- end %></ul>
|
|
|
|
</div>
|
|
|
|
<%- end %>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|