Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/firewall_nat_1to1_edit.php | ||
---|---|---|
44 | 44 |
require_once("filter.inc"); |
45 | 45 |
require("shaper.inc"); |
46 | 46 |
|
47 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_nat_1to1.php'); |
|
48 |
|
|
47 | 49 |
$specialsrcdst = explode(" ", "any pptp pppoe l2tp openvpn"); |
48 | 50 |
$ifdisp = get_configured_interface_with_descr(); |
49 | 51 |
foreach ($ifdisp as $kif => $kdescr) { |
... | ... | |
529 | 531 |
<tr> |
530 | 532 |
<td width="22%" valign="top"> </td> |
531 | 533 |
<td width="78%"> |
532 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" /> |
|
534 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> |
|
535 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
533 | 536 |
<?php if (isset($id) && $a_1to1[$id]): ?> |
534 | 537 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
535 | 538 |
<?php endif; ?> |
Formats disponibles : Unified diff
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