X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fview%2Fcbi%2Fucisection.htm;h=db32c904390734f8f442e75723f5d6aee1e8ba76;hb=7b23839dce0c09953142a5af946ab642027bc3c5;hp=0abc37e7c63a80c15473bc58b509f6a73164301e;hpb=d35a620e9f5665a94967f4bd02c93581a1dd7e00;p=project%2Fluci.git diff --git a/libs/cbi/luasrc/view/cbi/ucisection.htm b/libs/cbi/luasrc/view/cbi/ucisection.htm index 0abc37e7c..db32c9043 100644 --- a/libs/cbi/luasrc/view/cbi/ucisection.htm +++ b/libs/cbi/luasrc/view/cbi/ucisection.htm @@ -1,20 +1,90 @@ -<% self:render_children(section, scope or {}) %> - <% if #self.optionals[section] > 0 or self.dynamic then %> -
- <% if self.dynamic then %> - - <% else %> - - - <% end %> - -
- <% end %> \ No newline at end of file +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> + +<%- + 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 -%> +
  • + <%- 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 %> + +<% 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 %> + + + <% end %> + +
+<% end %>