From 1986dc2751517f11da943863a8cca6b3fe50be3b Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 21 Nov 2018 13:15:29 +0100 Subject: luci-app-openvpn: On apply/save redirect to OpenVPN overview page This change will redirect on apply/save to the OpenVPN overview page. This is the default behaviour on LuCI. Signed-off-by: Florian Eckert --- applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua | 4 ++-- applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua index 3fb734aeb..a693e0cf0 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua @@ -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] diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua index 42eb4cfd8..cee5f9d31 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua @@ -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] -- cgit v1.2.3