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/load_balancer_virtual_server_edit.php
41 41

  
42 42
require("guiconfig.inc");
43 43

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

  
44 46
if (!is_array($config['load_balancer']['virtual_server'])) {
45 47
        $config['load_balancer']['virtual_server'] = array();
46 48
}
......
273 275
                  <td width="22%" valign="top">&nbsp;</td>
274 276
                  <td align="left" valign="bottom" width="78%">
275 277
					<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" />
276
					<input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
278
					<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
277 279
			<?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?>
278 280
				<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
279 281
			<?php endif; ?>

Formats disponibles : Unified diff