%-
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
local keys, vals, name, opt = { }, { }
for name, opt in pairs(self.optionals[section]) do
keys[#keys+1] = name
vals[#vals+1] = opt.title
end
%>
0, "data-choices", luci.util.json_encode({keys, vals}))
%> />
<% else %>
<% end %>