From d2c1089f7206e5ab6b7e64b844c8f6ff8ef1fe55 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 27 Jan 2016 22:36:04 +0545 Subject: Status IPsec info box As well as internationalization of this info box, I have: 1) Made all of them the same text - it seemed odd that there were 2 different versions of text for the same thing. 2) Made it an info-level infoblock. It seemed odd to me that this was showing as a warning - it is really just a helpful info with link. 3) Made it open on page load if IPsec is not enabled, otherwise if IPsec is already enable it loads closed and the user can open and read it if they care. What do you think about this combination of things in the UI? I suspect there are a few other places where there is a convenient link 'You can configure xxx here', but it shows as a warning. If there is agreement about the infoblock approach I have suggested here, then I can do similar in other places. --- src/usr/local/www/status_ipsec.php | 14 +++++++++++++- src/usr/local/www/status_ipsec_leases.php | 15 +++++++++++++-- src/usr/local/www/status_ipsec_sad.php | 17 ++++++++++++++--- src/usr/local/www/status_ipsec_spd.php | 15 +++++++++++++-- 4 files changed, 53 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/status_ipsec.php b/src/usr/local/www/status_ipsec.php index d029fe6..09caa2a 100644 --- a/src/usr/local/www/status_ipsec.php +++ b/src/usr/local/www/status_ipsec.php @@ -519,5 +519,17 @@ function show_childsa(id, buttonid) { Here'); +if (ipsec_enabled()) { +?> +
+ +
+', ''), 'info', false); +?> +
+ diff --git a/src/usr/local/www/status_ipsec_leases.php b/src/usr/local/www/status_ipsec_leases.php index 155f274..0778e90 100644 --- a/src/usr/local/www/status_ipsec_leases.php +++ b/src/usr/local/www/status_ipsec_leases.php @@ -152,6 +152,17 @@ if (isset($mobile['pool']) && is_array($mobile['pool'])) { print_info_box(gettext('No IPsec pools.')); } -print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '' . gettext("here.") . ''); - +if (ipsec_enabled()) { +?> +
+ +
+', ''), 'info', false); +?> +
+ - Delete + @@ -149,6 +149,17 @@ if (count($sad)) { print_info_box(gettext('No IPsec security associations.')); } -print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '' . gettext("here.") . ''); - +if (ipsec_enabled()) { +?> +
+ +
+', ''), 'info', false); +?> +
+' . gettext("here.") . ''); - +if (ipsec_enabled()) { +?> +
+ +
+', ''), 'info', false); +?> +
+