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 aea9b48..4bed9b0 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