Commit 5d159b2c authored by Manuel Faux's avatar Manuel Faux

firewall: show warning banner if firewall disabled

If firewall is globally disabled, show a warning banner in all relevant
firewall configuration and diagnostic screens (filter and NAT).
parent 07cd06a9
......@@ -606,6 +606,10 @@ include("head.inc");
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
......
......@@ -87,6 +87,10 @@ include("head.inc");
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
......
......@@ -63,6 +63,10 @@ include("head.inc");
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
......
......@@ -114,6 +114,9 @@ include("head.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
......
......@@ -225,6 +225,9 @@ $( document ).ready(function() {
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php if (isset($savemsg)) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('natconf')): ?>
<?php print_info_box_apply(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
......
......@@ -175,6 +175,9 @@ $main_buttons = array(
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php
if (isset($savemsg))
print_info_box($savemsg);
......
......@@ -178,6 +178,9 @@ $main_buttons = array(
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php if (isset($savemsg)) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('natconf')): ?>
<?php print_info_box_apply(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
......
......@@ -246,6 +246,9 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php
if (isset($savemsg))
print_info_box($savemsg);
......
......@@ -200,6 +200,9 @@ $( document ).ready(function() {
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($config['system']['disablefilter'])): ?>
<?php print_warning_box(gettext("The firewall has globally been disabled. Configured rules are currently not enforced."));?>
<?php endif; ?>
<?php if (isset($savemsg)) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('filter')): ?><p>
<?php print_info_box_apply(gettext("The firewall rule configuration has been changed.<br />You must apply the changes in order for them to take effect."));?>
......
......@@ -237,6 +237,17 @@ function print_info_box($msg)
EOFnp;
}
function print_warning_box($msg)
{
echo <<<EOFnp
<div class="col-xs-12">
<div class="alert alert-warning alert-dismissible" role="alert">
<p>{$msg}</p>
</div>
</div>
EOFnp;
}
function get_std_save_message() {
global $d_sysrebootreqd_path;
$filter_related = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment