X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fview%2Fcbi%2Fucisection.htm;h=db32c904390734f8f442e75723f5d6aee1e8ba76;hb=7b23839dce0c09953142a5af946ab642027bc3c5;hp=e703053e135193c2de1cca40fb20d6f3b0c4dddf;hpb=7fb577f21e7fab5e88e5dcccc90e6d585700b3eb;p=oweals%2Fluci.git
diff --git a/libs/cbi/luasrc/view/cbi/ucisection.htm b/libs/cbi/luasrc/view/cbi/ucisection.htm
index e703053e1..db32c9043 100644
--- a/libs/cbi/luasrc/view/cbi/ucisection.htm
+++ b/libs/cbi/luasrc/view/cbi/ucisection.htm
@@ -13,11 +13,35 @@ $Id$
-%>
-<% self:render_children(section, scope or {}) %>
+<%-
+ if type(self.hidden) == "table" then
+ for k, v in pairs(self.hidden) do
+-%>
+
+<%-
+ end
+ end
+%>
+
+<% if self.tabs then %>
+ <%+cbi/tabcontainer%>
+<% else %>
+ <% self:render_children(section, scope or {}) %>
+<% end %>
<% if self.error and self.error[section] then -%>
-
<% for _, e in ipairs(self.error[section]) do %>
<%=luci.util.pcdata(e):gsub("\n"," ")%>
<% end %>
+
<% for _, e in ipairs(self.error[section]) do -%>
+
+ <%- if e == "invalid" then -%>
+ <%:One or more fields contain invalid values!%>
+ <%- elseif e == "missing" then -%>
+ <%:One or more required fields have no value!%>
+ <%- else -%>
+ <%=pcdata(e)%>
+ <%- end -%>
+
+ <%- end %>
<%- end %>
@@ -31,16 +55,17 @@ $Id$
<%-
for i, val in pairs(self.optionals[section]) do
-%>
- <%-=string.format("%q", val.option) .. ":" .. string.format("%q", striptags(val.title))-%>,
+ <%-=string.format("%q", val.option) .. ":" .. string.format("%q", striptags(val.title))-%>
+ <%-if next(self.optionals[section], i) then-%>,<%-end-%>
<%-
end
-%>
- }, '', '<%-:cbi_manual-%>');
+ }, '', '<%-: -- custom -- -%>');
<% end %>
<% else %>
-