summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-27 22:36:04 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-27 22:36:04 +0545
commitd2c1089f7206e5ab6b7e64b844c8f6ff8ef1fe55 (patch)
tree2de73df044d7734a833654c4c919f8968ba369d6 /src
parentf09d4db4b8827a882a1ad4ef540a39a83ec9e868 (diff)
downloadpfsense-d2c1089f7206e5ab6b7e64b844c8f6ff8ef1fe55.zip
pfsense-d2c1089f7206e5ab6b7e64b844c8f6ff8ef1fe55.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/status_ipsec.php14
-rw-r--r--src/usr/local/www/status_ipsec_leases.php15
-rw-r--r--src/usr/local/www/status_ipsec_sad.php17
-rw-r--r--src/usr/local/www/status_ipsec_spd.php15
4 files changed, 53 insertions, 8 deletions
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) {
<?php
unset($status);
-print_info_box(gettext("You can configure IPsec ") . '<a href="vpn_ipsec.php">Here</a>');
+if (ipsec_enabled()) {
+?>
+<div class="infoblock">
+<?php
+} else {
+?>
+<div class="infoblock blockopen">
+<?php
+}
+print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false);
+?>
+</div>
+<?php
include("foot.inc"); ?>
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 ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>');
-
+if (ipsec_enabled()) {
+?>
+<div class="infoblock">
+<?php
+} else {
+?>
+<div class="infoblock blockopen">
+<?php
+}
+print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false);
+?>
+</div>
+<?php
include("foot.inc");
diff --git a/src/usr/local/www/status_ipsec_sad.php b/src/usr/local/www/status_ipsec_sad.php
index bbc9698..e213e50 100644
--- a/src/usr/local/www/status_ipsec_sad.php
+++ b/src/usr/local/www/status_ipsec_sad.php
@@ -135,7 +135,7 @@ if (count($sad)) {
$args .= "&amp;proto=" . rawurlencode($sa['proto']);
$args .= "&amp;spi=" . rawurlencode("0x" . $sa['spi']);
?>
- <a class="btn btn-xs btn-danger" href="status_ipsec_sad.php?act=del&amp;<?=$args?>">Delete</a>
+ <a class="btn btn-xs btn-danger" href="status_ipsec_sad.php?act=del&amp;<?=$args?>"><?=gettext('Delete')?></a>
</td>
</tr>
@@ -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 ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>');
-
+if (ipsec_enabled()) {
+?>
+<div class="infoblock">
+<?php
+} else {
+?>
+<div class="infoblock blockopen">
+<?php
+}
+print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false);
+?>
+</div>
+<?php
include("foot.inc");
diff --git a/src/usr/local/www/status_ipsec_spd.php b/src/usr/local/www/status_ipsec_spd.php
index 34a8619..f051d39 100644
--- a/src/usr/local/www/status_ipsec_spd.php
+++ b/src/usr/local/www/status_ipsec_spd.php
@@ -133,6 +133,17 @@ if (count($spd)) {
print_info_box(gettext('No IPsec security policies configured.'));
}
-print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>');
-
+if (ipsec_enabled()) {
+?>
+<div class="infoblock">
+<?php
+} else {
+?>
+<div class="infoblock blockopen">
+<?php
+}
+print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false);
+?>
+</div>
+<?php
include("foot.inc");
OpenPOWER on IntegriCloud