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/interfaces_gre_edit.php
41 41
require("guiconfig.inc");
42 42
require_once("functions.inc");
43 43

  
44
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/interfaces_gre.php');
45

  
44 46
if (!is_array($config['gres']['gre']))
45 47
	$config['gres']['gre'] = array();
46 48

  
......
230 232
                  <td width="22%" valign="top">&nbsp;</td>
231 233
                  <td width="78%">
232 234
		    <input type="hidden" name="greif" value="<?=htmlspecialchars($pconfig['greif']); ?>" />
233
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" />
235
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
236
                    <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
234 237
                    <?php if (isset($id) && $a_gres[$id]): ?>
235 238
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
236 239
                    <?php endif; ?>

Formats disponibles : Unified diff