libs/cbi: Prevent SimpleForms from prematurely parsing form data

This commit is contained in:
Steven Barth 2008-08-14 22:18:46 +00:00
parent cfb11046a6
commit d46f017564

View file

@ -260,7 +260,9 @@ function SimpleForm.__init__(self, config, title, description, data)
end
function SimpleForm.parse(self, ...)
Node.parse(self, 1, ...)
if luci.http.formvalue("cbi.submit") then
Node.parse(self, 1, ...)
end
local valid = true
for i, v in ipairs(self.children) do