summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_captiveportal.php
diff options
context:
space:
mode:
authorGertjan <gw.kroeb@orange.fr>2014-06-23 19:41:07 +0200
committerGertjan <gw.kroeb@orange.fr>2014-06-23 19:41:07 +0200
commit5d792074b15b8ab984285359d229e6600fe0bcff (patch)
tree4ffb1e47113cfe4e6dcb76df8b49acfab46f8dfb /usr/local/www/status_captiveportal.php
parentfc227e34ecc371b6a1b6d57d9937c67b2cf90859 (diff)
downloadpfsense-5d792074b15b8ab984285359d229e6600fe0bcff.zip
pfsense-5d792074b15b8ab984285359d229e6600fe0bcff.tar.gz
Update status_captiveportal.php
Don't ask to select a zone if there is only ONE.
Diffstat (limited to 'usr/local/www/status_captiveportal.php')
-rw-r--r--usr/local/www/status_captiveportal.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php
index 68e0d13..c9aab18 100644
--- a/usr/local/www/status_captiveportal.php
+++ b/usr/local/www/status_captiveportal.php
@@ -62,6 +62,9 @@ if (!is_array($config['captiveportal']))
$config['captiveportal'] = array();
$a_cp =& $config['captiveportal'];
+if (count($a_cp) == 1)
+ $cpzone = current(array_keys($a_cp));
+
include("head.inc");
?>
@@ -122,7 +125,8 @@ $mac_man = load_mac_manufacturer_table();
<td width="20%" class="vncell" valign="top">
<br /><?=gettext("Captive Portal Zone"); ?><br/><br />
</td>
- <td class="vncell" width="30%" align="center">
+ <td class="vncell" width="30%" align="center">
+ <?php if (count($a_cp) > 1) { ?>
<form action="status_captiveportal.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<select name="zone" class="formselect" onchange="document.form1.submit()">
<option value="">none</option>
@@ -136,6 +140,7 @@ $mac_man = load_mac_manufacturer_table();
</select>
<br />
</form>
+ <?php } else echo $a_cp[$cpzone]['zone']; ?>
</td>
<td colspan="3" width="50%"></td>
</tr>
OpenPOWER on IntegriCloud