Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/services_dnsmasq_domainoverride_edit.php | ||
---|---|---|
40 | 40 |
|
41 | 41 |
require("guiconfig.inc"); |
42 | 42 |
|
43 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dnsmasq.php'); |
|
44 |
|
|
43 | 45 |
if (!is_array($config['dnsmasq']['domainoverrides'])) { |
44 | 46 |
$config['dnsmasq']['domainoverrides'] = array(); |
45 | 47 |
} |
... | ... | |
158 | 160 |
<tr> |
159 | 161 |
<td width="22%" valign="top"> </td> |
160 | 162 |
<td width="78%"> |
161 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" /> |
|
163 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> |
|
164 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
162 | 165 |
<?php if (isset($id) && $a_domainOverrides[$id]): ?> |
163 | 166 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
164 | 167 |
<?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