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/system_gateway_groups_edit.php
43 43
require_once("ipsec.inc");
44 44
require_once("vpn.inc");
45 45

  
46
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_gateway_groups.php');
47

  
46 48
if (!is_array($config['gateways']['gateway_group']))
47 49
	$config['gateways']['gateway_group'] = array();
48 50

  
......
341 343
                <tr>
342 344
                  <td width="22%" valign="top">&nbsp;</td>
343 345
                  <td width="78%"> 
344
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input type="button" value="<?=gettext("Cancel"); ?>" class="formbtn"  onclick="history.back()" />
346
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
347
                    <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
345 348
                    <?php if (isset($id) && $a_gateway_groups[$id]): ?>
346 349
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
347 350
                    <?php endif; ?>

Formats disponibles : Unified diff