diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-25 11:15:43 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-25 11:15:43 -0500 |
commit | 306a56c260f82aa50bce4c50e1779867d670bbd2 (patch) | |
tree | 348d30116a98134322297f3564f94b946f07aaf5 /src/usr/local/www | |
parent | b2f78cfcb10448ad48b20976462a518e5fae3645 (diff) | |
parent | ae6814a2df87d58d3b69db12f9f2624f8876226f (diff) | |
download | pfsense-306a56c260f82aa50bce4c50e1779867d670bbd2.zip pfsense-306a56c260f82aa50bce4c50e1779867d670bbd2.tar.gz |
Merge pull request #2533 from phil-davis/rowmoved
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/firewall_nat.php | 17 | ||||
-rw-r--r-- | src/usr/local/www/firewall_nat_1to1.php | 17 | ||||
-rw-r--r-- | src/usr/local/www/firewall_nat_npt.php | 17 | ||||
-rw-r--r-- | src/usr/local/www/firewall_nat_out.php | 17 |
4 files changed, 68 insertions, 0 deletions
diff --git a/src/usr/local/www/firewall_nat.php b/src/usr/local/www/firewall_nat.php index f2c8241..869fbff 100644 --- a/src/usr/local/www/firewall_nat.php +++ b/src/usr/local/www/firewall_nat.php @@ -424,12 +424,29 @@ events.push(function() { cursor: 'grabbing', update: function(event, ui) { $('#order-store').removeAttr('disabled'); + dirty = true; } }); // Check all of the rule checkboxes so that their values are posted $('#order-store').click(function () { $('[id^=frc]').prop('checked', true); + + // Suppress the "Do you really want to leave the page" message + saving = true; + }); + + // Globals + saving = false; + dirty = false; + + // provide a warning message if the user tries to change page before saving + $(window).bind('beforeunload', function(){ + if (!saving && dirty) { + return ("<?=gettext('You have moved one or more Port Forward rules but have not yet saved')?>"); + } else { + return undefined; + } }); }); //]]> diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php index 92b0a23..4661e70 100644 --- a/src/usr/local/www/firewall_nat_1to1.php +++ b/src/usr/local/www/firewall_nat_1to1.php @@ -303,12 +303,29 @@ events.push(function() { cursor: 'grabbing', update: function(event, ui) { $('#order-store').removeAttr('disabled'); + dirty = true; } }); // Check all of the rule checkboxes so that their values are posted $('#order-store').click(function () { $('[id^=frc]').prop('checked', true); + + // Suppress the "Do you really want to leave the page" message + saving = true; + }); + + // Globals + saving = false; + dirty = false; + + // provide a warning message if the user tries to change page before saving + $(window).bind('beforeunload', function(){ + if (!saving && dirty) { + return ("<?=gettext('You have moved one or more NAT 1:1 mappings but have not yet saved')?>"); + } else { + return undefined; + } }); }); //]]> diff --git a/src/usr/local/www/firewall_nat_npt.php b/src/usr/local/www/firewall_nat_npt.php index d57d3f0..2317dbd 100644 --- a/src/usr/local/www/firewall_nat_npt.php +++ b/src/usr/local/www/firewall_nat_npt.php @@ -281,12 +281,29 @@ events.push(function() { cursor: 'grabbing', update: function(event, ui) { $('#order-store').removeAttr('disabled'); + dirty = true; } }); // Check all of the rule checkboxes so that their values are posted $('#order-store').click(function () { $('[id^=frc]').prop('checked', true); + + // Suppress the "Do you really want to leave the page" message + saving = true; + }); + + // Globals + saving = false; + dirty = false; + + // provide a warning message if the user tries to change page before saving + $(window).bind('beforeunload', function(){ + if (!saving && dirty) { + return ("<?=gettext('You have moved one or more NPt mappings but have not yet saved')?>"); + } else { + return undefined; + } }); }); //]]> diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php index f0a66dc..c0d696e 100644 --- a/src/usr/local/www/firewall_nat_out.php +++ b/src/usr/local/www/firewall_nat_out.php @@ -684,12 +684,29 @@ events.push(function() { cursor: 'grabbing', update: function(event, ui) { $('#order-store').removeAttr('disabled'); + dirty = true; } }); // Check all of the rule checkboxes so that their values are posted $('#order-store').click(function () { $('[id^=frc]').prop('checked', true); + + // Suppress the "Do you really want to leave the page" message + saving = true; + }); + + // Globals + saving = false; + dirty = false; + + // provide a warning message if the user tries to change page before saving + $(window).bind('beforeunload', function(){ + if (!saving && dirty) { + return ("<?=gettext('You have moved one or more NAT outbound mappings but have not yet saved')?>"); + } else { + return undefined; + } }); }); //]]> |