From 7b5d67305eb6e33d2fa8aac79fa4ce922cca6a12 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 9 Mar 2009 14:28:55 +0000 Subject: Allow SimpleForm handler to set CBI status --- libs/cbi/luasrc/cbi.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs/cbi/luasrc') 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 -- cgit v1.2.3