From 52b95b80c05424b2747cd82365065f6e40db8f08 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 12 Dec 2016 21:34:03 +0100 Subject: [PATCH] (legacy) cancel button behaviour, closes https://github.com/opnsense/core/issues/1099 --- src/www/firewall_aliases_edit.php | 3 +-- src/www/firewall_nat_1to1_edit.php | 2 +- src/www/firewall_nat_edit.php | 2 +- src/www/firewall_nat_npt_edit.php | 2 +- src/www/firewall_nat_out_edit.php | 2 +- src/www/firewall_rules_edit.php | 2 +- src/www/firewall_schedule_edit.php | 2 +- src/www/firewall_scrub_edit.php | 2 +- src/www/firewall_virtual_ip_edit.php | 2 +- src/www/interfaces.php | 2 +- src/www/interfaces_bridge_edit.php | 2 +- src/www/interfaces_gif_edit.php | 2 +- src/www/interfaces_gre_edit.php | 2 +- src/www/interfaces_groups_edit.php | 2 +- src/www/interfaces_lagg_edit.php | 2 +- src/www/interfaces_ppps_edit.php | 2 +- src/www/interfaces_qinq_edit.php | 2 +- src/www/interfaces_vlan_edit.php | 2 +- src/www/interfaces_wireless_edit.php | 2 +- src/www/load_balancer_monitor_edit.php | 2 +- src/www/load_balancer_pool_edit.php | 2 +- src/www/load_balancer_virtual_server_edit.php | 2 +- src/www/services_dhcp_edit.php | 2 +- src/www/services_dhcpv6_edit.php | 2 +- src/www/services_dnsmasq_domainoverride_edit.php | 3 +-- src/www/services_dnsmasq_edit.php | 2 +- src/www/services_unbound_acls.php | 2 +- src/www/services_unbound_domainoverride_edit.php | 2 +- src/www/services_unbound_host_edit.php | 2 +- src/www/services_wol_edit.php | 2 +- src/www/system_advanced_sysctl.php | 2 +- src/www/system_gateway_groups_edit.php | 2 +- src/www/system_hasync.php | 2 +- src/www/system_routes_edit.php | 4 +--- 34 files changed, 34 insertions(+), 38 deletions(-) diff --git a/src/www/firewall_aliases_edit.php b/src/www/firewall_aliases_edit.php index eb6acbf09..ca1a6f3ff 100644 --- a/src/www/firewall_aliases_edit.php +++ b/src/www/firewall_aliases_edit.php @@ -271,7 +271,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { } } -$referer = (isset($_SERVER['HTTP_REFERER']) ? html_safe($_SERVER['HTTP_REFERER']) : '/firewall_aliases.php'); legacy_html_escape_form_data($pconfig); @@ -575,7 +574,7 @@ endforeach;   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_aliases.php'" /> diff --git a/src/www/firewall_nat_1to1_edit.php b/src/www/firewall_nat_1to1_edit.php index 614362020..09d3ae1de 100644 --- a/src/www/firewall_nat_1to1_edit.php +++ b/src/www/firewall_nat_1to1_edit.php @@ -394,7 +394,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_nat_1to1.php'" /> diff --git a/src/www/firewall_nat_edit.php b/src/www/firewall_nat_edit.php index d032bc432..22a4364ce 100644 --- a/src/www/firewall_nat_edit.php +++ b/src/www/firewall_nat_edit.php @@ -1018,7 +1018,7 @@ $( document ).ready(function() {   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_nat.php'" /> diff --git a/src/www/firewall_nat_npt_edit.php b/src/www/firewall_nat_npt_edit.php index 4ec0af386..3a584abea 100644 --- a/src/www/firewall_nat_npt_edit.php +++ b/src/www/firewall_nat_npt_edit.php @@ -267,7 +267,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_nat_npt.php'" /> diff --git a/src/www/firewall_nat_out_edit.php b/src/www/firewall_nat_out_edit.php index 8ba56d8a3..310be014f 100644 --- a/src/www/firewall_nat_out_edit.php +++ b/src/www/firewall_nat_out_edit.php @@ -777,7 +777,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_nat_out.php'" /> diff --git a/src/www/firewall_rules_edit.php b/src/www/firewall_rules_edit.php index 1b18c83e5..3f10c73af 100644 --- a/src/www/firewall_rules_edit.php +++ b/src/www/firewall_rules_edit.php @@ -1415,7 +1415,7 @@ include("head.inc");  
  " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_rules.php'" /> diff --git a/src/www/firewall_schedule_edit.php b/src/www/firewall_schedule_edit.php index b8641d02f..bc7240077 100644 --- a/src/www/firewall_schedule_edit.php +++ b/src/www/firewall_schedule_edit.php @@ -1153,7 +1153,7 @@ function removeRow(el) {   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_schedule.php'" /> diff --git a/src/www/firewall_scrub_edit.php b/src/www/firewall_scrub_edit.php index a4c93a0d6..3e0bf3b9b 100644 --- a/src/www/firewall_scrub_edit.php +++ b/src/www/firewall_scrub_edit.php @@ -655,7 +655,7 @@ include("head.inc");  
  " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_rules.php'" /> diff --git a/src/www/firewall_virtual_ip_edit.php b/src/www/firewall_virtual_ip_edit.php index 4d202b176..cd5f7654f 100644 --- a/src/www/firewall_virtual_ip_edit.php +++ b/src/www/firewall_virtual_ip_edit.php @@ -452,7 +452,7 @@ $( document ).ready(function() {   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/firewall_virtual_ip.php'" /> diff --git a/src/www/interfaces.php b/src/www/interfaces.php index b9655a863..dc35c240c 100644 --- a/src/www/interfaces.php +++ b/src/www/interfaces.php @@ -3250,7 +3250,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces.php'" /> diff --git a/src/www/interfaces_bridge_edit.php b/src/www/interfaces_bridge_edit.php index 87ae960a7..e08ddf42a 100644 --- a/src/www/interfaces_bridge_edit.php +++ b/src/www/interfaces_bridge_edit.php @@ -621,7 +621,7 @@ $(document).ready(function() { " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_bridge.php'" /> diff --git a/src/www/interfaces_gif_edit.php b/src/www/interfaces_gif_edit.php index e4af50141..d9e85d3a8 100644 --- a/src/www/interfaces_gif_edit.php +++ b/src/www/interfaces_gif_edit.php @@ -275,7 +275,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_gif.php'" /> diff --git a/src/www/interfaces_gre_edit.php b/src/www/interfaces_gre_edit.php index bc6eadb9c..bab452cd2 100644 --- a/src/www/interfaces_gre_edit.php +++ b/src/www/interfaces_gre_edit.php @@ -264,7 +264,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_gre.php'" /> diff --git a/src/www/interfaces_groups_edit.php b/src/www/interfaces_groups_edit.php index 85fd0a7ad..90393cb01 100644 --- a/src/www/interfaces_groups_edit.php +++ b/src/www/interfaces_groups_edit.php @@ -200,7 +200,7 @@ legacy_html_escape_form_data($pconfig);   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_groups.php'" /> diff --git a/src/www/interfaces_lagg_edit.php b/src/www/interfaces_lagg_edit.php index dcb1de156..d48aaab6f 100644 --- a/src/www/interfaces_lagg_edit.php +++ b/src/www/interfaces_lagg_edit.php @@ -288,7 +288,7 @@ legacy_html_escape_form_data($pconfig); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_lagg.php'" /> diff --git a/src/www/interfaces_ppps_edit.php b/src/www/interfaces_ppps_edit.php index 2fa87ad88..1d607b050 100644 --- a/src/www/interfaces_ppps_edit.php +++ b/src/www/interfaces_ppps_edit.php @@ -803,7 +803,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_ppps.php'" /> diff --git a/src/www/interfaces_qinq_edit.php b/src/www/interfaces_qinq_edit.php index 8eab4ae6a..c325f2164 100644 --- a/src/www/interfaces_qinq_edit.php +++ b/src/www/interfaces_qinq_edit.php @@ -212,7 +212,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_qinq.php'" /> diff --git a/src/www/interfaces_vlan_edit.php b/src/www/interfaces_vlan_edit.php index 0e846d57c..a6d5ab67f 100644 --- a/src/www/interfaces_vlan_edit.php +++ b/src/www/interfaces_vlan_edit.php @@ -214,7 +214,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_vlan.php'" /> diff --git a/src/www/interfaces_wireless_edit.php b/src/www/interfaces_wireless_edit.php index 8261f899f..a4bfcf5df 100644 --- a/src/www/interfaces_wireless_edit.php +++ b/src/www/interfaces_wireless_edit.php @@ -188,7 +188,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/interfaces_wireless.php'" /> diff --git a/src/www/load_balancer_monitor_edit.php b/src/www/load_balancer_monitor_edit.php index 60cd1fe39..09cd208dd 100644 --- a/src/www/load_balancer_monitor_edit.php +++ b/src/www/load_balancer_monitor_edit.php @@ -322,7 +322,7 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/load_balancer_monitor.php'" /> diff --git a/src/www/load_balancer_pool_edit.php b/src/www/load_balancer_pool_edit.php index 53b22ec2c..035cf10c1 100644 --- a/src/www/load_balancer_pool_edit.php +++ b/src/www/load_balancer_pool_edit.php @@ -371,7 +371,7 @@ include("head.inc");
"/> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/load_balancer_pool.php'" /> diff --git a/src/www/load_balancer_virtual_server_edit.php b/src/www/load_balancer_virtual_server_edit.php index 6dd4dfdfe..d23dd78b1 100644 --- a/src/www/load_balancer_virtual_server_edit.php +++ b/src/www/load_balancer_virtual_server_edit.php @@ -317,7 +317,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/load_balancer_virtual_server.php'" /> diff --git a/src/www/services_dhcp_edit.php b/src/www/services_dhcp_edit.php index 789a4ae26..7b8afb383 100644 --- a/src/www/services_dhcp_edit.php +++ b/src/www/services_dhcp_edit.php @@ -531,7 +531,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_dhcp.php'" /> diff --git a/src/www/services_dhcpv6_edit.php b/src/www/services_dhcpv6_edit.php index 992e84b8e..f3f4ab562 100644 --- a/src/www/services_dhcpv6_edit.php +++ b/src/www/services_dhcpv6_edit.php @@ -244,7 +244,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_dhcpv6.php'" /> diff --git a/src/www/services_dnsmasq_domainoverride_edit.php b/src/www/services_dnsmasq_domainoverride_edit.php index dad28da2c..7d90600bd 100644 --- a/src/www/services_dnsmasq_domainoverride_edit.php +++ b/src/www/services_dnsmasq_domainoverride_edit.php @@ -32,7 +32,6 @@ require_once("system.inc"); require_once("services.inc"); require_once("interfaces.inc"); -$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dnsmasq.php'); if (empty($config['dnsmasq']['domainoverrides']) || !is_array($config['dnsmasq']['domainoverrides'])) { $config['dnsmasq']['domainoverrides'] = array(); @@ -198,7 +197,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_dnsmasq.php'" /> diff --git a/src/www/services_dnsmasq_edit.php b/src/www/services_dnsmasq_edit.php index 21be2f64c..24085f066 100644 --- a/src/www/services_dnsmasq_edit.php +++ b/src/www/services_dnsmasq_edit.php @@ -283,7 +283,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_dnsmasq.php'" /> diff --git a/src/www/services_unbound_acls.php b/src/www/services_unbound_acls.php index 3d77e60d4..2d9cb0f28 100644 --- a/src/www/services_unbound_acls.php +++ b/src/www/services_unbound_acls.php @@ -314,7 +314,7 @@ include("head.inc");  
  " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_unbound_acls.php'" /> diff --git a/src/www/services_unbound_domainoverride_edit.php b/src/www/services_unbound_domainoverride_edit.php index 2c1d1108f..d4b993cf9 100644 --- a/src/www/services_unbound_domainoverride_edit.php +++ b/src/www/services_unbound_domainoverride_edit.php @@ -154,7 +154,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_unbound_overrides.php'" /> diff --git a/src/www/services_unbound_host_edit.php b/src/www/services_unbound_host_edit.php index 3cf8e76f4..2b0f75c08 100644 --- a/src/www/services_unbound_host_edit.php +++ b/src/www/services_unbound_host_edit.php @@ -260,7 +260,7 @@ include("head.inc");   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_unbound_overrides.php'" /> diff --git a/src/www/services_wol_edit.php b/src/www/services_wol_edit.php index e85dbb5b2..a3cfa93b6 100644 --- a/src/www/services_wol_edit.php +++ b/src/www/services_wol_edit.php @@ -156,7 +156,7 @@ legacy_html_escape_form_data($pconfig);   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/services_wol.php'" /> diff --git a/src/www/system_advanced_sysctl.php b/src/www/system_advanced_sysctl.php index 46e2d85a5..be62780a9 100644 --- a/src/www/system_advanced_sysctl.php +++ b/src/www/system_advanced_sysctl.php @@ -223,7 +223,7 @@ $( document ).ready(function() {   " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/system_advanced_sysctl.php'" /> diff --git a/src/www/system_gateway_groups_edit.php b/src/www/system_gateway_groups_edit.php index 7d258b4b5..55bc02285 100644 --- a/src/www/system_gateway_groups_edit.php +++ b/src/www/system_gateway_groups_edit.php @@ -309,7 +309,7 @@ $( document ).ready(function() { " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/system_gateway_groups.php'" /> diff --git a/src/www/system_hasync.php b/src/www/system_hasync.php index d4d9ef5b4..262aa480a 100644 --- a/src/www/system_hasync.php +++ b/src/www/system_hasync.php @@ -382,7 +382,7 @@ include("head.inc"); - " onclick="window.location.href=''" /> + " onclick="window.location.href='/system_hasync.php'" /> diff --git a/src/www/system_routes_edit.php b/src/www/system_routes_edit.php index 8ebf1d44e..85b4ace29 100644 --- a/src/www/system_routes_edit.php +++ b/src/www/system_routes_edit.php @@ -32,8 +32,6 @@ require_once("guiconfig.inc"); require_once("filter.inc"); require_once("interfaces.inc"); -$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_routes.php'); - if (!isset($config['staticroutes']) || !is_array($config['staticroutes'])) { $config['staticroutes'] = array(); } @@ -330,7 +328,7 @@ include("head.inc"); " /> - " onclick="window.location.href=''" /> + " onclick="window.location.href='/system_routes.php'" />