projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9199b2c
)
libs/cbi: implement SimpleForm on_cancel hook in main class
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 8 Nov 2009 02:31:41 +0000
(
02:31
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 8 Nov 2009 02:31:41 +0000
(
02:31
+0000)
libs/cbi/luasrc/cbi.lua
patch
|
blob
|
history
diff --git
a/libs/cbi/luasrc/cbi.lua
b/libs/cbi/luasrc/cbi.lua
index bfdfd699998eecbb5d0682e1926a4ad8b1c9d4e4..9268d412df9a607364a3e2414d0d24ffd91f0084 100644
(file)
--- 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