summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules.php
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-07-13 08:50:53 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-07-13 08:50:53 -0300
commit891d4f60ab462974ac2d05433acb2d48e0987c4c (patch)
treef08767851c79c59a4e2b6ac21849e656a3601863 /usr/local/www/firewall_rules.php
parent34bebed2f10216f31170010b70d6463146982ad3 (diff)
parent3e251b12903ea709b908d1cba30fe61cadbe2da3 (diff)
downloadpfsense-891d4f60ab462974ac2d05433acb2d48e0987c4c.zip
pfsense-891d4f60ab462974ac2d05433acb2d48e0987c4c.tar.gz
Merge remote branch 'mainline/master' into 2_firewall
Conflicts: usr/local/www/firewall_rules.php
Diffstat (limited to 'usr/local/www/firewall_rules.php')
-rwxr-xr-xusr/local/www/firewall_rules.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 4553641..f21ea30 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -126,7 +126,17 @@ if($_REQUEST['dragdroporder']) {
$config = write_config("Drag and drop firewall rules ordering update.");
// Redirect back to page
mark_subsystem_dirty('filter');
- Header("Location: firewall_rules.php?if=" . $_REQUEST['if']);
+ $undo = array();
+ foreach($_REQUEST['dragtable'] as $dt)
+ $undo[] = "";
+ $counter = 0;
+ foreach($_REQUEST['dragtable'] as $dt) {
+ $undo[$dt] = $counter;
+ $counter++;
+ }
+ foreach($undo as $dt)
+ $undotxt .= "&dragtable[]={$dt}";
+ Header("Location: firewall_rules.php?if=" . $_REQUEST['if'] . "&undodrag=true" . $undotxt);
exit;
}
@@ -286,7 +296,16 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
</script>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('filter')): ?><p>
-<?php print_info_box_np(gettext("The firewall rule configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));?><br>
+<?php
+if($_REQUEST['undodrag']) {
+ foreach($_REQUEST['dragtable'] as $dt)
+ $dragtable .= "&dragtable[]={$dt}";
+ print_info_box_np_undo(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."), "apply" , gettext("Apply changes") , "firewall_rules.php?if={$_REQUEST['if']}&dragdroporder=true&{$dragtable}");
+} else {
+ print_info_box_np(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."));
+}
+?>
+<br>
<?php endif; ?>
<div id="loading" style="visibity:hidden">
<img src="/themes/<?=$g['theme']?>/images/misc/loader.gif"> Loading, please wait...
OpenPOWER on IntegriCloud