From d46f01756494e03571c67dcee38e715f519eaf83 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 14 Aug 2008 22:18:46 +0000 Subject: libs/cbi: Prevent SimpleForms from prematurely parsing form data --- libs/cbi/luasrc/cbi.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libs/cbi/luasrc/cbi.lua') diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 3bb56f36c..9996c8418 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -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 -- cgit v1.2.3