diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-08-20 18:51:55 -0400 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-08-20 18:52:46 -0400 |
commit | 6380f9177d6a5020edbe50ecaaab7bba14e5fc03 (patch) | |
tree | bcacfa09fa457eb324216ed7bba202190edb845a /src | |
parent | 24b20350a88b81e99aa6faa5685283e00bdf2083 (diff) | |
download | pfsense-6380f9177d6a5020edbe50ecaaab7bba14e5fc03.zip pfsense-6380f9177d6a5020edbe50ecaaab7bba14e5fc03.tar.gz |
Avoid JS error by always rendering mobile ipsec DIV, even if empty
(cherry picked from commit 60138edbd4d7740c2d140e0d8fb4c5ee945db9e5)
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/widgets/widgets/ipsec.widget.php | 16 |
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 a611e5e..c6bf356 100644 --- a/src/usr/local/www/widgets/widgets/ipsec.widget.php +++ b/src/usr/local/www/widgets/widgets/ipsec.widget.php @@ -247,9 +247,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> @@ -257,14 +257,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> |