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_relay_protocol_edit.php
41 41

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

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

  
44 46
if (!is_array($config['load_balancer']['lbprotocol'])) {
45 47
	$config['load_balancer']['lbprotocol'] = array();
46 48
}
......
275 277
		<tr align="left">
276 278
			<td width="22%" valign="top">&nbsp;</td>
277 279
			<td width="78%">
278
				<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="AllOptions($('lbaction'), true); AllOptions($('available_action'), false);"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
280
				<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="AllOptions($('lbaction'), true); AllOptions($('available_action'), false);">
281
				<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
279 282
				<?php if (isset($id) && $a_protocol[$id] && $_GET['act'] != 'dup'): ?>
280 283
				<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
281 284
				<?php endif; ?>

Formats disponibles : Unified diff