summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2012-07-24 16:35:27 +0200
committerWarren Baker <warren@decoy.co.za>2012-07-24 16:35:27 +0200
commita5416de22195347b14dfdc8a07ac676b463c9ccc (patch)
treea53ca2eac787ca290ec0a264647f5f5fcb4dcd5c /usr
parent3a8e5e3c24b01a4e8626aa978ef96886cb5dd490 (diff)
downloadpfsense-a5416de22195347b14dfdc8a07ac676b463c9ccc.zip
pfsense-a5416de22195347b14dfdc8a07ac676b463c9ccc.tar.gz
Return the user to the tab they were working originally working on
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_aliases.php30
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php8
2 files changed, 22 insertions, 16 deletions
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index c6a904f..48115d2 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -52,7 +52,8 @@ $a_aliases = &$config['aliases']['alias'];
if ($_POST) {
- $pconfig = $_POST;
+ if($_POST['tab'])
+ $tab = $_POST['tab'];
if ($_POST['apply']) {
$retval = 0;
@@ -164,19 +165,20 @@ include("head.inc");
<?php endif; ?>
<?php pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases/pre_table"); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
-<tr><td class="tabnavtbl">
- <?php
- $tab=($_REQUEST['tab'] == "" ? "ip" : preg_replace("/\W/","",$_REQUEST['tab']));
- $tab_array = array();
- $tab_array[] = array(gettext("IP"),($tab=="ip"? true : false), "/firewall_aliases.php?tab=ip");
- $tab_array[] = array(gettext("Ports"), ($tab=="port"? true : false), "/firewall_aliases.php?tab=port");
- $tab_array[] = array(gettext("Urls"), ($tab=="url"? true : false), "/firewall_aliases.php?tab=url");
- $tab_array[] = array(gettext("All"), ($tab=="all"? true : false), "/firewall_aliases.php?tab=all");
- display_top_tabs($tab_array);
-
- ?>
- </td></tr>
-
+ <tr>
+ <td class="tabnavtbl">
+ <?php
+ $tab=($_REQUEST['tab'] == "" ? "ip" : preg_replace("/\W/","",$_REQUEST['tab']));
+ $tab_array = array();
+ $tab_array[] = array(gettext("IP"),($tab=="ip"? true : false), "/firewall_aliases.php?tab=ip");
+ $tab_array[] = array(gettext("Ports"), ($tab=="port"? true : false), "/firewall_aliases.php?tab=port");
+ $tab_array[] = array(gettext("Urls"), ($tab=="url"? true : false), "/firewall_aliases.php?tab=url");
+ $tab_array[] = array(gettext("All"), ($tab=="all"? true : false), "/firewall_aliases.php?tab=all");
+ display_top_tabs($tab_array);
+ ?>
+ <input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>">
+ </td>
+ </tr>
<tr><td><div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 8b9df48..194d445 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -357,8 +357,11 @@ if ($_POST) {
write_config();
- header("Location: firewall_aliases.php");
- exit;
+ if($_POST['tab'])
+ header("Location: firewall_aliases.php?tab=" . htmlspecialchars ($_POST['tab']));
+ else
+ header("Location: firewall_aliases.php");
+ exit;
}
//we received input errors, copy data to prevent retype
else
@@ -573,6 +576,7 @@ EOD;
<div id="inputerrors"></div>
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
+<input name="tab" type="hidden" id="tab" value="<?=htmlspecialchars($pconfig['type']);?>" />
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Edit"); ?></td>
OpenPOWER on IntegriCloud