Project

General

Profile

« Previous | Next » 

Revision dd65598e

Added by Darren Embry about 13 years ago

Add per-rule delete ("X") button to Outbound NAT rules

http://redmine.pfsense.org/issues/1062

View differences:

usr/local/www/firewall_nat_out.php
219 219
        exit;
220 220
}
221 221

  
222
if ($_GET['act'] == "del") {
223
	if ($a_out[$_GET['id']]) {
224
		unset($a_out[$_GET['id']]);
225
		write_config();
226
		mark_subsystem_dirty('natconf');
227
		header("Location: firewall_nat_out.php");
228
		exit;
229
	}
230
}
231

  
222 232
if (isset($_POST['del_x'])) {
223 233
        /* delete selected rules */
224 234
        if (is_array($_POST['rule']) && count($_POST['rule'])) {
......
433 443
                  <td class="list" valign="middle" nowrap>
434 444
                    <table border="0" cellspacing="0" cellpadding="1">
435 445
                      <tr>
446
                        <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
436 447
                        <td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit mapping");?>"></a></td>
437 448
                      </tr>
438 449
                      <tr>
439
                        <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
450
			<td align="center" valign="middle"><a href="firewall_nat_out.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule");?>"></a></td>
440 451
                        <td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0"></a></td>
441 452
                      </tr>
442 453
                    </table>

Also available in: Unified diff