summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-09-12 16:36:54 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-09-12 16:37:08 -0300
commit62424bdbbb7b2f37c9a4b6e3531c7024e573317a (patch)
tree29d675e74c7ea900ec74e9019359cbb94c2d1275 /usr/local/www/firewall_aliases_edit.php
parent7e7f07aec204236f01a385ebe6f2ae4957d98922 (diff)
downloadpfsense-62424bdbbb7b2f37c9a4b6e3531c7024e573317a.zip
pfsense-62424bdbbb7b2f37c9a4b6e3531c7024e573317a.tar.gz
Remove almost all calls to history.back() and make Cancel button back to HTTP_REFERER, there are a couple of places I didn't touch on this commit because it requires more work
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index fc35612..8931edc 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -51,6 +51,8 @@ require_once("shaper.inc");
$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Edit"));
+$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_aliases.php');
+
// Keywords not allowed in names
$reserved_keywords = array("all", "pass", "block", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec");
@@ -746,7 +748,7 @@ if (empty($tab)) {
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
- <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
+ <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
</td>
</tr>
</table>
OpenPOWER on IntegriCloud