<table class="cbi-section-table">
<tr class="cbi-section-table-titles">
<%- if not self.anonymous then -%>
- <th> </th>
+ <th> </th>
<%- end -%>
<%- for i, k in pairs(self.children) do if not k.optional then -%>
<th class="cbi-section-table-cell">
<%- if k.titleref then -%></a><%- end -%>
</th>
<%- count = count + 1; end; end; if self.extedit or self.addremove then -%>
- <th class="cbi-section-table-cell"> </th>
+ <th class="cbi-section-table-cell"> </th>
<%- count = count + 1; end -%>
</tr>
<tr class="cbi-section-table-descr">
</tr>
<%- end -%>
</table>
+
+ <% if self.error then %>
+ <div class="cbi-section-error">
+ <ul><% for _, c in pairs(self.error) do for _, e in ipairs(c) do -%>
+ <li><%=luci.util.pcdata(e):gsub("\n","<br />")%></li>
+ <%- end end %></ul>
+ </div>
+ <% end %>
+
<%- if self.addremove then -%>
<div class="cbi-section-table-row">
<td colspan="<%=count%>" class="cbi-section-table-optionals">
<% if self.anonymous then %>
<input class="cbi-button cbi-button-add" type="submit" value="<%:cbi_add%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" title="<%:cbi_add%>" />
<% else %>
+ <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %>
<input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
<input class="cbi-button cbi-button-add" type="submit" value="<%:cbi_add%>" title="<%:cbi_add%>" />
- <% end %>
-
- <% if self.err_invalid then %>
- <div class="cbi-error"><%:cbi_invalid%></div>
+ <% if self.invalid_cts then -%>
+ <br /><%:cbi_invalid%></div>
+ <%- end %>
<% end %>
</div>
</td>