summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-03-09 14:28:55 +0000
committerSteven Barth <steven@midlink.org>2009-03-09 14:28:55 +0000
commit7b5d67305eb6e33d2fa8aac79fa4ce922cca6a12 (patch)
treee6333083516c6d671a55b5acae39796b52c6587f /libs/cbi/luasrc
parent73607dbd7d4bbebd99c163fcc337a1d62032a2d3 (diff)
Allow SimpleForm handler to set CBI status
Diffstat (limited to 'libs/cbi/luasrc')
-rw-r--r--libs/cbi/luasrc/cbi.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index b6ccc54806..88203660c9 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -577,7 +577,12 @@ function SimpleForm.parse(self, readinput, ...)
or valid and FORM_VALID
or FORM_INVALID
- self.dorender = not self.handle or self:handle(state, self.data) ~= false
+ self.dorender = not self.handle
+ if self.handle then
+ local nrender, nstate = self:handle(state, self.data)
+ self.dorender = self.dorender or (nrender ~= false)
+ state = nstate or state
+ end
return state
end