diff options
Diffstat (limited to 'src/usr/local/www/firewall_nat.php')
-rw-r--r-- | src/usr/local/www/firewall_nat.php | 17 |
1 files changed, 17 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; + } }); }); //]]> |