Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/services_dnsmasq_edit.php | ||
---|---|---|
54 | 54 |
|
55 | 55 |
require("guiconfig.inc"); |
56 | 56 |
|
57 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dnsmasq.php'); |
|
58 |
|
|
57 | 59 |
if (!is_array($config['dnsmasq']['hosts'])) |
58 | 60 |
$config['dnsmasq']['hosts'] = array(); |
59 | 61 |
|
... | ... | |
287 | 289 |
<tr> |
288 | 290 |
<td width="22%" valign="top"> </td> |
289 | 291 |
<td width="78%"> |
290 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" /> |
|
292 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> |
|
293 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
291 | 294 |
<?php if (isset($id) && $a_hosts[$id]): ?> |
292 | 295 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
293 | 296 |
<?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