From: Steven Barth Date: Mon, 9 Mar 2009 14:28:55 +0000 (+0000) Subject: Allow SimpleForm handler to set CBI status X-Git-Tag: 0.9.0~613 X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=7b5d67305eb6e33d2fa8aac79fa4ce922cca6a12;p=project%2Fluci.git Allow SimpleForm handler to set CBI status --- diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index b6ccc5480..88203660c 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