summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-08-20 18:51:55 -0400
committerSteve Beaver <sbeaver@netgate.com>2017-08-20 18:51:55 -0400
commit60138edbd4d7740c2d140e0d8fb4c5ee945db9e5 (patch)
treeff6571547975f5e4f9366347cb7d5eaed35c5e17
parent2438b40dceaff2a23638be66018f8c9dc46d2e01 (diff)
downloadpfsense-60138edbd4d7740c2d140e0d8fb4c5ee945db9e5.zip
pfsense-60138edbd4d7740c2d140e0d8fb4c5ee945db9e5.tar.gz
Avoid JS error by always rendering mobile ipsec DIV, even if empty
-rw-r--r--src/usr/local/www/widgets/widgets/ipsec.widget.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/usr/local/www/widgets/widgets/ipsec.widget.php b/src/usr/local/www/widgets/widgets/ipsec.widget.php
index 7db655a..3ed3aad 100644
--- a/src/usr/local/www/widgets/widgets/ipsec.widget.php
+++ b/src/usr/local/www/widgets/widgets/ipsec.widget.php
@@ -248,9 +248,9 @@ if (isset($config['ipsec']['phase2'])): ?>
</table>
</div>
- <?php if (is_array($mobile['pool'])): ?>
<div id="ipsec-Mobiles" style="display:none;" class="table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover">
+<?php if (is_array($mobile['pool'])): ?>
<thead>
<tr>
<th><?=gettext("User")?></th>
@@ -258,14 +258,20 @@ if (isset($config['ipsec']['phase2'])): ?>
<th><?=gettext("Status")?></th>
</tr>
</thead>
- <tbody id="body-mobile">
+ <tbody>
<tr><td colspan="3"><?=gettext("Retrieving mobile data ")?><i class="fa fa-cog fa-spin"></i></td></tr>
</tbody>
+<?php else:?>
+ <thead>
+ <tr>
+ <th colspan="3" class="text-danger"><?=gettext("No mobile tunnels have been configured")?></th>
+ </tr>
+ </thead>
+<?php endif;?>
</table>
</div>
- <span id="poo"></span>
- <?php endif;?>
+
<?php else: ?>
<div>
<h5 style="padding-left:10px;"><?=gettext("There are no configured IPsec Tunnels")?></h5>
OpenPOWER on IntegriCloud