Fix last commit
authorSteven Barth <steven@midlink.org>
Thu, 26 Mar 2009 12:39:43 +0000 (12:39 +0000)
committerSteven Barth <steven@midlink.org>
Thu, 26 Mar 2009 12:39:43 +0000 (12:39 +0000)
libs/cbi/luasrc/cbi.lua

index aea9b485e621e853010b46e885fde7078dbcc2a1..4bed9b0e68ebe81dee74786378c347c02e5dd058 100644 (file)
@@ -378,13 +378,13 @@ function Map.parse(self, readinput, ...)
                end
        end
 
-       if self.proceed then
-               self.state = FORM_PROCEED
-       elseif self:submitstate() then
-               if self.save then
-                       self.state = self.changed and FORM_CHANGED or FORM_VALID
-               else
+       if self:submitstate() then
+               if not self.save then
                        self.state = FORM_INVALID
+               elseif self.proceed then
+                       self.state = FORM_PROCEED
+               else
+                       self.state = self.changed and FORM_CHANGED or FORM_VALID
                end
        else
                self.state = FORM_NODATA