diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-11-08 02:31:41 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-11-08 02:31:41 +0000 |
commit | 392bfd38f86f7f5ea23878dbdf96cfe6bd8a2655 (patch) | |
tree | a1c026e8bac9fbe79fd08824d3fb458c0a4370fa /libs/cbi | |
parent | 9199b2ca02510d796be62d9b1fea46aff6dbe05d (diff) |
libs/cbi: implement SimpleForm on_cancel hook in main class
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index bfdfd6999..9268d412d 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -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 |