diff options
author | Phil Davis <phil.davis@inf.org> | 2015-07-13 10:53:03 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-07-15 21:41:33 +0545 |
commit | 3e41547819778dbecb3f7816d78f735124a9e3f7 (patch) | |
tree | 13ba913e82613d15cd781a28f517ff2c227f85c4 /usr/local/www/services_wol_edit.php | |
parent | 36f90078fbaf12510673f6e08dcf17db36d322fa (diff) | |
download | pfsense-3e41547819778dbecb3f7816d78f735124a9e3f7.zip pfsense-3e41547819778dbecb3f7816d78f735124a9e3f7.tar.gz |
Cancel button after input error for RELENG_2_2
Diffstat (limited to 'usr/local/www/services_wol_edit.php')
-rw-r--r-- | usr/local/www/services_wol_edit.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php index da43c6f..e882427 100644 --- a/usr/local/www/services_wol_edit.php +++ b/usr/local/www/services_wol_edit.php @@ -52,7 +52,11 @@ function wol_sort() { require("guiconfig.inc"); -$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_wol.php'); +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_wol.php'); +} if (!is_array($config['wol']['wolentry'])) { $config['wol']['wolentry'] = array(); @@ -160,6 +164,7 @@ include("head.inc"); <td width="78%"> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> + <input name="referer" type="hidden" value="<?=$referer;?>" /> <?php if (isset($id) && $a_wol[$id]): ?> <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> <?php endif; ?> |