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_unbound_host_edit.php
41 41
##|*MATCH=services_unbound_host_edit.php*
42 42
##|-PRIV
43 43

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

  
44 46
function hostcmp($a, $b) {
45 47
	return strcasecmp($a['host'], $b['host']);
46 48
}
......
291 293
			<tr>
292 294
				<td width="22%" valign="top">&nbsp;</td>
293 295
				<td width="78%">
294
					<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" />
296
					<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
297
					<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
295 298
					<?php if (isset($id) && $a_hosts[$id]): ?>
296 299
					<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
297 300
					<?php endif; ?>

Formats disponibles : Unified diff