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_nat_npt_edit.php
58 58
require_once("filter.inc");
59 59
require("shaper.inc");
60 60

  
61
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_nat_npt.php');
62

  
61 63
$ifdisp = get_configured_interface_with_descr();
62 64
foreach ($ifdisp as $kif => $kdescr) {
63 65
        $specialsrcdst[] = "{$kif}";
......
272 274
                <tr> 
273 275
                  <td width="22%" valign="top">&nbsp;</td>
274 276
                  <td width="78%"> 
275
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
277
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
278
                    <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
276 279
                    <?php if (isset($id) && $a_npt[$id]): ?>
277 280
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
278 281
                    <?php endif; ?>

Formats disponibles : Unified diff