luci-app-openvpn: On apply/save redirect to OpenVPN overview page
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 21 Nov 2018 12:15:29 +0000 (13:15 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 22 Nov 2018 07:18:17 +0000 (08:18 +0100)
This change will redirect on apply/save to the OpenVPN overview page.
This is the default behaviour on LuCI.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua

index 3fb734aeb0ee160c0e3441356a6453dbd629e051..a693e0cf0ced7ba4dbb3d6b4b386f6c20bae9176 100644 (file)
@@ -703,10 +703,10 @@ local cts = { }
 local params = { }
 
 local m = Map("openvpn")
-local p = m:section( SimpleSection )
-
+m.redirect = luci.dispatcher.build_url("admin", "services", "openvpn")
 m.apply_on_parse = true
 
+local p = m:section( SimpleSection )
 p.template = "openvpn/pageswitch"
 p.mode     = "advanced"
 p.instance = arg[1]
index 42eb4cfd820bd1edb91ebd294cb0ce4f151f4764..cee5f9d31d3982f05a6bdd5edfb48129736ef013 100644 (file)
@@ -95,11 +95,10 @@ local basicParams = {
 
 
 local m = Map("openvpn")
-local p = m:section( SimpleSection )
-
+m.redirect = luci.dispatcher.build_url("admin", "services", "openvpn")
 m.apply_on_parse = true
 
-
+local p = m:section( SimpleSection )
 p.template = "openvpn/pageswitch"
 p.mode     = "basic"
 p.instance = arg[1]