summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi/luasrc/view
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi/luasrc/view')
-rw-r--r--libs/cbi/luasrc/view/cbi/cell_valueheader.htm2
-rw-r--r--libs/cbi/luasrc/view/cbi/full_valueheader.htm2
-rw-r--r--libs/cbi/luasrc/view/cbi/tblsection.htm4
-rw-r--r--libs/cbi/luasrc/view/cbi/ucisection.htm4
4 files changed, 7 insertions, 5 deletions
diff --git a/libs/cbi/luasrc/view/cbi/cell_valueheader.htm b/libs/cbi/luasrc/view/cbi/cell_valueheader.htm
index 9a065a3da5..dda17463cf 100644
--- a/libs/cbi/luasrc/view/cbi/cell_valueheader.htm
+++ b/libs/cbi/luasrc/view/cbi/cell_valueheader.htm
@@ -13,4 +13,4 @@ $Id$
-%>
-<td class="cbi-value-field<% if self.error then %> cbi-value-error<% end %>" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
+<td class="cbi-value-field<% if self.error and self.error[section] then %> cbi-value-error<% end %>" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
diff --git a/libs/cbi/luasrc/view/cbi/full_valueheader.htm b/libs/cbi/luasrc/view/cbi/full_valueheader.htm
index fed2412f07..cbeda755bf 100644
--- a/libs/cbi/luasrc/view/cbi/full_valueheader.htm
+++ b/libs/cbi/luasrc/view/cbi/full_valueheader.htm
@@ -13,7 +13,7 @@ $Id$
-%>
-<div class="cbi-value<% if self.error then %> cbi-value-error<% end %>" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
+<div class="cbi-value<% if self.error and self.error[section] then %> cbi-value-error<% end %>" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
<%- if self.title and #self.title > 0 then -%>
<label class="cbi-value-title"<%= attr("for", cbid) %>>
<%- if self.titleref then -%><a title="<%=self.titledesc or translate('cbi_gorel')%>" class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%>
diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm
index 5a2b247344..49930f8482 100644
--- a/libs/cbi/luasrc/view/cbi/tblsection.htm
+++ b/libs/cbi/luasrc/view/cbi/tblsection.htm
@@ -100,7 +100,9 @@ end
<% if self.error then %>
<div class="cbi-section-error">
- <ul><% for _, e in ipairs(self.error) do %><li><%=luci.util.pcdata(e):gsub("\n","<br />")%></li><% end %></ul>
+ <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 %>
diff --git a/libs/cbi/luasrc/view/cbi/ucisection.htm b/libs/cbi/luasrc/view/cbi/ucisection.htm
index feab18e627..92343bba20 100644
--- a/libs/cbi/luasrc/view/cbi/ucisection.htm
+++ b/libs/cbi/luasrc/view/cbi/ucisection.htm
@@ -15,9 +15,9 @@ $Id$
<% self:render_children(section, scope or {}) %>
-<% if self.error then -%>
+<% if self.error and self.error[section] then -%>
<div class="cbi-section-error">
- <ul><% for _, e in ipairs(self.error) do %><li><%=luci.util.pcdata(e):gsub("\n","<br />")%></li><% end %></ul>
+ <ul><% for _, e in ipairs(self.error[section]) do %><li><%=luci.util.pcdata(e):gsub("\n","<br />")%></li><% end %></ul>
</div>
<%- end %>