- http.header("X-CBI-State", state or 0)
- luci.template.render("header")
- for i, res in ipairs(maps) do
- res:render()
+
+local function _form(self, ...)
+ local cbi = require "luci.cbi"
+ local tpl = require "luci.template"
+ local http = require "luci.http"
+
+ local maps = luci.cbi.load(self.model, ...)
+ local state = nil
+
+ for i, res in ipairs(maps) do
+ local cstate = res:parse()
+ if not state or cstate < state then
+ state = cstate