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/firewall_virtual_ip_edit.php
53 53
require_once("filter.inc");
54 54
require("shaper.inc");
55 55

  
56
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_virtual_ip.php');
57

  
56 58
if (!is_array($config['virtualip']['vip'])) {
57 59
        $config['virtualip']['vip'] = array();
58 60
}
......
470 472
                <tr>
471 473
                  <td width="22%" valign="top">&nbsp;</td>
472 474
                  <td width="78%">
473
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
475
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
476
                    <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
474 477
                    <?php if (isset($id) && $a_vip[$id]): ?>
475 478
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
476 479
                    <?php endif; ?>

Formats disponibles : Unified diff