summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-11-05 21:12:19 +0000
committerSteven Barth <steven@midlink.org>2008-11-05 21:12:19 +0000
commitba689499bb82e7bff9a118feaec6a7fd032157e0 (patch)
treeab04e6cf26f2d15fb81f7ec887b2b4a136c277ec /libs/web/luasrc
parent5c36f2175179f2dae03b8d2f31677186c41efcd2 (diff)
Merge on_***_to handlers
Diffstat (limited to 'libs/web/luasrc')
-rw-r--r--libs/web/luasrc/dispatcher.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index 79532ddf1d..2323cf8d29 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -529,6 +529,16 @@ function cbi(model, config)
end
end
+ if config.on_valid_to and state and state > 0 and state < 2 then
+ luci.http.redirect(config.on_valid_to)
+ return
+ end
+
+ if config.on_changed_to and state and state > 1 then
+ luci.http.redirect(config.on_changed_to)
+ return
+ end
+
if config.on_success_to and state and state > 0 then
luci.http.redirect(config.on_success_to)
return