X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fview%2Fcbi%2Fucisection.htm;h=aef770e17a105acf2cdd1a7b66ac25f59618e28a;hp=1d318f7915db52849b71b21b11a9035ac034f2ad;hb=7c765875884d6866c53b63757731b079bace2e9b;hpb=18dfd21c39e6ddcd6936174af654a05b742c51b7 diff --git a/libs/cbi/luasrc/view/cbi/ucisection.htm b/libs/cbi/luasrc/view/cbi/ucisection.htm index 1d318f791..aef770e17 100644 --- a/libs/cbi/luasrc/view/cbi/ucisection.htm +++ b/libs/cbi/luasrc/view/cbi/ucisection.htm @@ -13,15 +13,49 @@ $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 -%> +
+ +
+<%- end %> -<% if #self.optionals[section] > 0 or self.dynamic then %> +<% if self.optionals[section] and #self.optionals[section] > 0 or self.dynamic then %>
<% if self.dynamic then %> - + + <% if self.optionals[section] and #self.optionals[section] > 0 then %> + + <% end %> <% else %> - + <% for key, val in pairs(self.optionals[section]) do -%> <%- end %> @@ -32,7 +66,8 @@ $Id$ <%- for k,v in pairs(d.deps) do -%> - <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>, + <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%> + <%-if next(d.deps, k) then-%>,<%-end-%> <%- end -%> @@ -40,6 +75,6 @@ $Id$ <%- end %><% end %> <% end %> <% end %> - +
<% end %>