Commit 25987211 authored by Franco Fichtner's avatar Franco Fichtner

vpn/openvpn: push back service shortcut to close #432

parent 39c34cbd
......@@ -70,6 +70,12 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service =
return "";
$space = ($addspace) ? " " : "" ;
switch ($shortcut_section) {
case "openvpn":
if (!empty($service['mode']) && is_numeric($service['id']))
$link = "vpn_openvpn_{$service['mode']}.php?act=edit&id={$service['id']}";
else
$link = $shortcuts[$shortcut_section]['main'];
break;
case "captiveportal":
if (!empty($service['zone']))
$link = "services_captiveportal.php?zone={$service['zone']}";
......@@ -174,6 +180,9 @@ $shortcuts['dhcp6']['status'] = "status_dhcpv6_leases.php";
$shortcuts['ipsec'] = array();
$shortcuts['ipsec']['service'] = "ipsec";
$shortcuts['openvpn'] = array();
$shortcuts['openvpn']['service'] = "openvpn";
$shortcuts['firewall'] = array();
$shortcuts['firewall']['main'] = "firewall_rules.php";
$shortcuts['firewall']['log'] = "diag_logs_filter.php";
......
......@@ -28,6 +28,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("openvpn.inc");
require_once("services.inc");
......@@ -67,6 +68,7 @@ function kill_client($port, $remipp) {
}
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Connection Status'));
$shortcut_section = 'openvpn';
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$vpnid = 0;
......
......@@ -33,6 +33,7 @@ require_once("services.inc");
require_once("interfaces.inc");
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Client'));
$shortcut_section = 'openvpn';
if (!isset($config['openvpn']['openvpn-client'])) {
$config['openvpn']['openvpn-client'] = array();
......
......@@ -26,12 +26,14 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("openvpn.inc");
require_once("services.inc");
require_once("interfaces.inc");
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Client Specific Overrides'));
$shortcut_section = 'openvpn';
// define all fields used in this form
$all_form_fields = "custom_options,disable,common_name,block,description
......
......@@ -37,6 +37,7 @@ require_once("openvpn-client-export.inc");
global $current_openvpn_version, $current_openvpn_version_rev;
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Client Export'));
$shortcut_section = 'openvpn';
$ras_server = array();
if (isset($config['openvpn']['openvpn-server'])) {
......
......@@ -35,6 +35,7 @@ require_once("interfaces.inc");
require_once("openvpn-client-export.inc");
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Shared Key Export'));
$shortcut_section = 'openvpn';
$ras_server = array();
if (isset($config['openvpn']['openvpn-server'])) {
......
......@@ -26,6 +26,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("guiconfig.inc");
require_once("openvpn.inc");
require_once("services.inc");
......@@ -395,7 +396,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
}
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Server'));
$shortcut_section = 'openvpn';
include("head.inc");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment