Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/system_gateways_edit.php | ||
---|---|---|
42 | 42 |
require("guiconfig.inc"); |
43 | 43 |
require("pkg-utils.inc"); |
44 | 44 |
|
45 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_gateways.php'); |
|
46 |
|
|
45 | 47 |
$a_gateways = return_gateways_array(true, false, true); |
46 | 48 |
$a_gateways_arr = array(); |
47 | 49 |
foreach($a_gateways as $gw) { |
... | ... | |
855 | 857 |
<tr> |
856 | 858 |
<td width="22%" valign="top"> </td> |
857 | 859 |
<td width="78%"> |
858 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change()" /> <input type="button" value="<?=gettext("Cancel");?>" class="formbtn" onclick="history.back()" /> |
|
860 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change()" /> |
|
861 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
859 | 862 |
<?php if (isset($id) && $a_gateways[$id]): ?> |
860 | 863 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
861 | 864 |
<?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