Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/vpn_l2tp_users_edit.php | ||
---|---|---|
54 | 54 |
require("guiconfig.inc"); |
55 | 55 |
require_once("vpn.inc"); |
56 | 56 |
|
57 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/vpn_l2tp_users.php'); |
|
58 |
|
|
57 | 59 |
if (!is_array($config['l2tp']['user'])) { |
58 | 60 |
$config['l2tp']['user'] = array(); |
59 | 61 |
} |
... | ... | |
177 | 179 |
<td width="22%" valign="top"> </td> |
178 | 180 |
<td width="78%"> |
179 | 181 |
<input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext('Save');?>" /> |
180 |
<input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="history.back()" />
|
|
182 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
|
|
181 | 183 |
<?php if (isset($id) && $a_secret[$id]): ?> |
182 | 184 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
183 | 185 |
<?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