Révision 62424bdb
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/services_captiveportal_vouchers.php | ||
---|---|---|
46 | 46 |
require("captiveportal.inc"); |
47 | 47 |
require_once("voucher.inc"); |
48 | 48 |
|
49 |
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_captiveportal_vouchers.php'); |
|
50 |
|
|
49 | 51 |
$cpzone = $_GET['zone']; |
50 | 52 |
if (isset($_POST['zone'])) |
51 | 53 |
$cpzone = $_POST['zone']; |
... | ... | |
631 | 633 |
<input type="hidden" name="zone" id="zone" value="<?=htmlspecialchars($cpzone);?>" /> |
632 | 634 |
<input type="hidden" name="exponent" id="exponent" value="<?=$pconfig['exponent'];?>" /> |
633 | 635 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true); before_save();" /> |
634 |
<input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
|
|
636 |
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
|
|
635 | 637 |
</td> |
636 | 638 |
</tr> |
637 | 639 |
<tr> |
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