diff options
author | Steven Barth <steven@midlink.org> | 2009-10-28 17:38:11 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-10-28 17:38:11 +0000 |
commit | e93a3e0c749960deefdde6fb3d0e1a1ee3696b89 (patch) | |
tree | 7cf60b46ae09816ab3f969cd98354d640d04091b /libs/cbi | |
parent | 1e9b205464d0611db5fe7e036c3628ebe484c803 (diff) |
CBI: Delegators: Don't proceed when step is not completed yet
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 2c8cb53e4..7c20129be 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -614,11 +614,12 @@ function Delegator.parse(self, ...) if not Map.formvalue(self, "cbi.submit") then return FORM_NODATA - elseif not newcurrent or not self:get(newcurrent) then + elseif stat > FORM_PROCEED + and (not newcurrent or not self:get(newcurrent)) then self:_run_hooks("on_done") return FORM_DONE else - self.current = newcurrent + self.current = newcurrent or self.current self.active = self:get(self.current) if type(self.active) ~= "function" then self.active:parse(false) |