diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-04-02 12:33:50 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-04-02 12:34:43 -0300 |
commit | ac7f1763e1712dd85335f09d0434444cee2a6683 (patch) | |
tree | 1783297632dbc286b067fd7e7ff47a92e9e3911b /usr/local/www/firewall_aliases_edit.php | |
parent | 9db1ff32c7005da50baf78e089608e7eb72eae9a (diff) | |
download | pfsense-ac7f1763e1712dd85335f09d0434444cee2a6683.zip pfsense-ac7f1763e1712dd85335f09d0434444cee2a6683.tar.gz |
Return to correct tab after save or delete an alias
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index f439648..97b9e28 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -62,6 +62,8 @@ if (!is_array($config['aliases']['alias'])) $config['aliases']['alias'] = array(); $a_aliases = &$config['aliases']['alias']; +$tab = $_REQUEST['tab']; + if($_POST) $origname = $_POST['origname']; @@ -364,8 +366,8 @@ if ($_POST) { if (write_config()) mark_subsystem_dirty('aliases'); - if($_POST['tab']) - header("Location: firewall_aliases.php?tab=" . htmlspecialchars ($_POST['tab'])); + if(!empty($tab)) + header("Location: firewall_aliases.php?tab=" . htmlspecialchars ($tab)); else header("Location: firewall_aliases.php"); exit; @@ -583,7 +585,17 @@ 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']);?>" /> +<?php +if (empty($tab)) { + if ($pconfig['type'] == 'urltable') + $tab = 'url'; + else if ($pconfig['type'] == 'host') + $tab = 'ip'; + else + $tab = $pconfig['type']; +} +?> +<input name="tab" type="hidden" id="tab" value="<?=htmlspecialchars($tab);?>" /> <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Edit"); ?></td> |