Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/firewall_rules_edit.php | ||
---|---|---|
45 | 45 |
require_once("filter.inc"); |
46 | 46 |
require("shaper.inc"); |
47 | 47 |
|
48 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_rules.php'); |
|
49 |
|
|
48 | 50 |
function is_posnumericint($arg) { |
49 | 51 |
// Note that to be safe we do not allow any leading zero - "01", "007" |
50 | 52 |
return (is_numericint($arg) && $arg[0] != '0' && $arg > 0); |
... | ... | |
1251 | 1253 |
<td width="22%" valign="top"> </td> |
1252 | 1254 |
<td width="78%"> |
1253 | 1255 |
<br /> |
1254 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" /> |
|
1256 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> |
|
1257 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
1255 | 1258 |
<?php if (isset($id) && $a_filter[$id]): ?> |
1256 | 1259 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
1257 | 1260 |
<?php endif; ?> |
... | ... | |
1727 | 1730 |
<td width="22%" valign="top"> </td> |
1728 | 1731 |
<td width="78%"> |
1729 | 1732 |
<br /> |
1730 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" /> |
|
1733 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> |
|
1734 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
1731 | 1735 |
<?php if (isset($id) && $a_filter[$id]): ?> |
1732 | 1736 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
1733 | 1737 |
<input name="tracker" type="hidden" value="<?=htmlspecialchars($pconfig['tracker']);?>"> |
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