Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/services_wol_edit.php | ||
---|---|---|
51 | 51 |
|
52 | 52 |
require("guiconfig.inc"); |
53 | 53 |
|
54 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_wol.php'); |
|
55 |
|
|
54 | 56 |
if (!is_array($config['wol']['wolentry'])) { |
55 | 57 |
$config['wol']['wolentry'] = array(); |
56 | 58 |
} |
... | ... | |
155 | 157 |
<tr> |
156 | 158 |
<td width="22%" valign="top"> </td> |
157 | 159 |
<td width="78%"> |
158 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" /> |
|
160 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> |
|
161 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
159 | 162 |
<?php if (isset($id) && $a_wol[$id]): ?> |
160 | 163 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
161 | 164 |
<?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