Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/interfaces_vlan_edit.php | ||
---|---|---|
41 | 41 |
|
42 | 42 |
require("guiconfig.inc"); |
43 | 43 |
|
44 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/interfaces_vlan.php'); |
|
45 |
|
|
44 | 46 |
if (!is_array($config['vlans']['vlan'])) |
45 | 47 |
$config['vlans']['vlan'] = array(); |
46 | 48 |
|
... | ... | |
197 | 199 |
<td width="22%" valign="top"> </td> |
198 | 200 |
<td width="78%"> |
199 | 201 |
<input type="hidden" name="vlanif" value="<?=htmlspecialchars($pconfig['vlanif']); ?>" /> |
200 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" /> |
|
202 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> |
|
203 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> |
|
201 | 204 |
<?php if (isset($id) && $a_vlans[$id]): ?> |
202 | 205 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
203 | 206 |
<?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