Merge on_***_to handlers
This commit is contained in:
parent
5c36f21751
commit
ba689499bb
1 changed files with 10 additions and 0 deletions
|
@ -529,6 +529,16 @@ function cbi(model, config)
|
||||||
end
|
end
|
||||||
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
|
if config.on_success_to and state and state > 0 then
|
||||||
luci.http.redirect(config.on_success_to)
|
luci.http.redirect(config.on_success_to)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue