libs/cbi: implement SimpleForm on_cancel hook in main class
This commit is contained in:
parent
9199b2ca02
commit
392bfd38f8
1 changed files with 4 additions and 0 deletions
|
@ -671,6 +671,10 @@ function SimpleForm.parse(self, readinput, ...)
|
|||
return FORM_SKIP
|
||||
end
|
||||
|
||||
if self:formvalue("cbi.cancel") and self:_run_hooks("on_cancel") then
|
||||
return FORM_DONE
|
||||
end
|
||||
|
||||
if self:submitstate() then
|
||||
Node.parse(self, 1, ...)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue