Projet

Général

Profil

« Précédent | Suivant » 

Révision 62424bdb

Ajouté par Renato Botelho il y a plus de 9 ans

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

Voir les différences:

usr/local/www/services_dhcpv6_edit.php
53 53

  
54 54
require_once('globals.inc');
55 55

  
56
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dhcpv6.php');
57

  
56 58
if(!$g['services_dhcp_server_enable']) {
57 59
	header("Location: /");
58 60
	exit;
......
243 245
                <tr> 
244 246
                  <td width="22%" valign="top">&nbsp;</td>
245 247
                  <td width="78%"> 
246
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" />
248
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
249
                    <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
247 250
                    <?php if (isset($id) && $a_maps[$id]): ?>
248 251
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
249 252
                    <?php endif; ?>

Formats disponibles : Unified diff