summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-14 22:18:46 +0000
committerSteven Barth <steven@midlink.org>2008-08-14 22:18:46 +0000
commitd46f01756494e03571c67dcee38e715f519eaf83 (patch)
tree66d5094c2dbc728c7134294b406d41c1453a4d7e
parentcfb11046a61d6032f290641f4a3eaf0596da71d9 (diff)
libs/cbi: Prevent SimpleForms from prematurely parsing form data
-rw-r--r--libs/cbi/luasrc/cbi.lua4
1 files changed, 3 insertions, 1 deletions
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