<table class="cbi-section-table">
<tr class="cbi-section-table-titles">
<%- if not self.anonymous then -%>
- <th> </th>
+ <%- if self.sectionhead then -%>
+ <th class="cbi-section-table-cell"><%=self.sectionhead%></th>
+ <%- else -%>
+ <th> </th>
+ <%- end -%>
<%- 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 title="<%=self.titledesc or translate('cbi_gorel')%>" class="cbi-title-ref" href="<%=k.titleref%>"><%- end -%>
+ <%- if k.titleref then -%><a title="<%=self.titledesc or translate(' ')%>" class="cbi-title-ref" href="<%=k.titleref%>"><%- end -%>
<%-=k.title-%>
<%- if k.titleref then -%></a><%- end -%>
</th>
</tr>
<tr class="cbi-section-table-descr">
<%- if not self.anonymous then -%>
- <th></th>
+ <%- if self.sectiondesc then -%>
+ <th class="cbi-section-table-cell"><%=self.sectiondesc%></th>
+ <%- else -%>
+ <th></th>
+ <%- end -%>
<%- end -%>
<%- for i, k in pairs(self.children) do if not k.optional then -%>
<th class="cbi-section-table-cell"><%=k.description%></th>
<%- elseif type(self.extedit) == "function" then -%>
<%=self:extedit(section)%>
<%- end -%>
- " title="<%:edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:edit%>" /></a>
+ " title="<%:Edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:Edit%>" /></a>
<%- end; if self.addremove then %>
- <input type="image" value="<%:cbi_del%>" name="cbi.rts.<%=self.config%>.<%=k%>" alt="<%:cbi_del%>" title="<%:cbi_del%>" src="<%=resource%>/cbi/remove.gif" />
+ <input type="image" value="<%:Delete%>" name="cbi.rts.<%=self.config%>.<%=k%>" alt="<%:Delete%>" title="<%:Delete%>" src="<%=resource%>/cbi/remove.gif" />
<%- end -%>
</td>
<%- end -%>
</tr>
- <% if self.tag_deperror[section] or self.tag_invalid[section] or self.tag_error[section] then %>
- <tr class="cbi-section-table-row">
- <td colspan="<%=count%>">
- <%- if self.tag_deperror[section] then -%>
- <div class="cbi-error"><%:cbi_deperror%></div>
- <%- elseif self.tag_invalid[section] then -%>
- <div class="cbi-error"><%:cbi_invalid_section%></div>
- <%- elseif self.tag_error[section] then -%>
- <div class="cbi-error"><%=self.tag_error[section]%></div>
- <%- end -%>
- </td>
- </tr>
- <% end %>
<%- end -%>
<%- if isempty then -%>
<tr class="cbi-section-table-row">
- <td colspan="<%=count%>"><em><br /><%:cbi_sectempty%></em></td>
+ <td colspan="<%=count%>"><em><br /><%:This section contains no values yet%></em></td>
</tr>
<%- end -%>
</table>
- <%- if self.addremove then -%>
- <div class="cbi-section-table-row">
- <td colspan="<%=count%>" class="cbi-section-table-optionals">
- <div class="cbi-section-create">
- <% 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 %>
- <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>
- <% end %>
- </div>
- </td>
+ <% if self.error then %>
+ <div class="cbi-section-error">
+ <ul><% for _, c in pairs(self.error) do for _, e in ipairs(c) do -%>
+ <li><%=pcdata(e):gsub("\n","<br />")%></li>
+ <%- end end %></ul>
</div>
- <%- end -%>
+ <% end %>
+
+ <%- if self.addremove then -%>
+ <% if self.template_addremove then include(self.template_addremove) else -%>
+ <div class="cbi-section-create cbi-tblsection-create">
+ <% if self.anonymous then %>
+ <input class="cbi-button cbi-button-add" type="submit" value="<%:Add%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" title="<%: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="<%:Add%>" title="<%:Add%>" />
+ <% if self.invalid_cts then -%>
+ <br /><%:Invalid%></div>
+ <%- end %>
+ <% end %>
+ </div>
+ <%- end %>
+ <%- end -%>
</div>
</fieldset>
<!-- /tblsection -->