summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-17 16:24:31 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-17 16:24:31 +0000
commitfa16d51eb69169a1ea96b6880b2955b2c36efb2f (patch)
tree309823f18b78ddb45023a3ad999d56a15c001db6 /usr
parent4527638f51fa956ccc4b75f509d40bcbadf0f85c (diff)
downloadpfsense-fa16d51eb69169a1ea96b6880b2955b2c36efb2f.zip
pfsense-fa16d51eb69169a1ea96b6880b2955b2c36efb2f.tar.gz
MFC 6919
Set checkbox values to yes and use similar logic to system_advanced.php
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces_wlan.inc62
1 files changed, 46 insertions, 16 deletions
diff --git a/usr/local/www/interfaces_wlan.inc b/usr/local/www/interfaces_wlan.inc
index 054126c..2e90016 100755
--- a/usr/local/www/interfaces_wlan.inc
+++ b/usr/local/www/interfaces_wlan.inc
@@ -137,10 +137,7 @@ function wireless_config_post() {
$optcfg['wireless']['ssid'] = $_POST['ssid'];
$optcfg['wireless']['stationname'] = $_POST['stationname'];
$optcfg['wireless']['channel'] = $_POST['channel'];
- $optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] ? true : false;
- $optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] ? true : false;
- $optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] ? true : false;
- $optcfg['wireless']['turbo']['enable'] = $_POST['turbo_enable'] ? true : false;
+
$optcfg['wireless']['authmode'] = $_POST['authmode'];
$optcfg['wireless']['hidessid']['enable'] = $_POST['hidessid_enable'] ? true : false;
$optcfg['wireless']['txpower'] = $_POST['txpower'];
@@ -156,8 +153,41 @@ function wireless_config_post() {
$optcfg['wireless']['wpa']['passphrase'] = $_POST['passphrase'];
$optcfg['wireless']['wpa']['ieee8021x']['enable'] = $_POST['ieee8021x_enable'] ? 1 : 0;
$optcfg['wireless']['wpa']['ext_wpa_sw'] = $_POST['ext_wpa_sw'];
- $optcfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] ? true : false;
- $optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] ? true : false;
+
+ if($_POST['wpa_enable'])
+ $optcfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] = true;
+ else
+ unset($optcfg['wireless']['wpa']['enable']);
+
+ if($_POST['wep_enable'])
+ $optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true;
+ else
+ unset($optcfg['wireless']['wep']['enable']);
+
+ if($_POST['wme_enable'])
+ $optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] = true;
+ else
+ unset($optcfg['wireless']['wme']['enable']);
+
+ if($_POST['pureg_enable'])
+ $optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] = true;
+ else
+ unset($optcfg['wireless']['pureg']['enable']);
+
+ if($_POST['apbridge_enable'])
+ $optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] = true;
+ else
+ unset($optcfg['wireless']['apbridge']['enable']);
+
+ if($_POST['turbo_enable'])
+ $optcfg['wireless']['turbo']['enable'] = $_POST['turbo_enable'] = true;
+ else
+ unset($optcfg['wireless']['turbo']['enable']);
+
+
+
+
+
$optcfg['wireless']['wep']['key'] = array();
for ($i = 1; $i <= 4; $i++) {
@@ -222,13 +252,13 @@ function wireless_config_print() {
</tr>
<tr>
<td valign="top" class="vncell">802.11g only</td>
- <td class="vtable"><input name="pureg_enable" type="checkbox" class="formfld" id="pureg_enable" value="yes" <? if (isset($pconfig['pureg_enable'])) echo "checked";?>>
+ <td class="vtable"><input name="pureg_enable" type="checkbox" value="yes" class="formfld" id="pureg_enable" value="yes" <? if (isset($pconfig['pureg_enable'])) echo "checked";?>>
<br/>When operating as an access point in 802.11g mode allow only 11g-capable stations to associate (11b-only stations are not permitted to associate).
</td>
</tr>
<tr>
<td valign="top" class="vncell">Allow intra-BSS communication</td>
- <td class="vtable"><input name="apbridge_enable" type="checkbox" class="formfld" id="apbridge_enable" value="yes" <? if (isset($pconfig['apbridge_enable'])) echo "checked";?>>
+ <td class="vtable"><input name="apbridge_enable" type="checkbox" value="yes" class="formfld" id="apbridge_enable" value="yes" <? if (isset($pconfig['apbridge_enable'])) echo "checked";?>>
<br/>
When operating as an access point, enable this if you want to pass packets between wireless clients directly.
<br/>
@@ -237,20 +267,20 @@ function wireless_config_print() {
</tr>
<tr>
<td valign="top" class="vncell">Enable turbo mode</td>
- <td class="vtable"><input name="turbo_enable" type="checkbox" class="formfld" id="turbo_enable" value="yes" <? if (isset($pconfig['turbo_enable'])) echo "checked";?>>
+ <td class="vtable"><input name="turbo_enable" type="checkbox" value="yes" class="formfld" id="turbo_enable" value="yes" <? if (isset($pconfig['turbo_enable'])) echo "checked";?>>
<br/>Setting this option will force the card to use turbo mode.
<br/>use "ifconfig interface list channel" to list turbo capable channels.
</td>
</tr>
<tr>
<td valign="top" class="vncell">Enable WME</td>
- <td class="vtable"><input name="wme_enable" type="checkbox" class="formfld" id="wme_enable" value="yes" <? if (isset($pconfig['wme_enable'])) echo "checked";?>>
+ <td class="vtable"><input name="wme_enable" type="checkbox" value="yes" class="formfld" id="wme_enable" value="yes" <? if (isset($pconfig['wme_enable'])) echo "checked";?>>
<br/>Setting this option will force the card to use WME (wireless QoS).
</td>
</tr>
<tr>
<td valign="top" class="vncell">Enable Hide SSID</td>
- <td class="vtable"><input name="hidessid_enable" type="checkbox" class="formfld" id="hidessid_enable" value="yes" <? if (isset($pconfig['hidessid_enable'])) echo "checked";?>>
+ <td class="vtable"><input name="hidessid_enable" type="checkbox" value="yes" class="formfld" id="hidessid_enable" value="yes" <? if (isset($pconfig['hidessid_enable'])) echo "checked";?>>
<br/>
Setting this option will force the card to NOT broadcast it's SSID
<br/>
@@ -297,7 +327,7 @@ function wireless_config_print() {
</tr>
<tr>
<td valign="top" class="vncell">WEP</td>
- <td class="vtable"> <input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <? if (isset($pconfig['wep_enable'])) echo "checked"; ?>>
+ <td class="vtable"> <input name="wep_enable" type="checkbox" value="yes" id="wep_enable" value="yes" <? if (isset($pconfig['wep_enable'])) echo "checked"; ?>>
<strong>Enable WEP</strong>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
@@ -335,7 +365,7 @@ function wireless_config_print() {
</tr>
<tr>
<td valign="top" class="vncell"><strong>WPA</strong></td>
- <td class="vtable"><input name="wpa_enable" type="checkbox" class="formfld" id="wpa_enable" value="yes" <? if (isset($pconfig['wpa_enable'])) echo "checked"; ?>>
+ <td class="vtable"><input name="wpa_enable" type="checkbox" value="yes" class="formfld" id="wpa_enable" value="yes" <? if (isset($pconfig['wpa_enable'])) echo "checked"; ?>>
<strong>Enable WPA</strong>
<br/><br/>
<table border="0" cellspacing="0" cellpadding="0">
@@ -373,7 +403,7 @@ function wireless_config_print() {
</tr>
<tr>
<td valign="top" class="vncell">Enable MAC Filtering</td>
- <td class="vtable"><input name="macaddr_acl_enable" type="checkbox" class="formfld" id="macaddr_acl_enable" value="yes"<? if (isset($pconfig['macaddr_acl_enable'])) echo "checked"; ?>>
+ <td class="vtable"><input name="macaddr_acl_enable" type="checkbox" value="yes" class="formfld" id="macaddr_acl_enable" value="yes"<? if (isset($pconfig['macaddr_acl_enable'])) echo "checked"; ?>>
Setting this option will enable the use of a mac filterlist to allow deny association based on mac address
<br/><br/>
<select name="mac_acl" class="formfld" id="macaddr_acl">
@@ -418,13 +448,13 @@ function wireless_config_print() {
</tr>
<tr>
<td valign="top" class="vncell">Strict Key Regeneration</td>
- <td class="vtable"><input name="wpa_strict_rekey" type="checkbox" class="formfld" id="wpa_strict_rekey" value="1" <? if (isset($pconfig['wpa_strict_rekey'])) echo "checked"; ?>>
+ <td class="vtable"><input name="wpa_strict_rekey" type="checkbox" value="yes" class="formfld" id="wpa_strict_rekey" value="1" <? if (isset($pconfig['wpa_strict_rekey'])) echo "checked"; ?>>
<br/>Setting this option will force the AP to rekey whenever a client disassociates.
</td>
</tr>
<tr>
<td valign="top" class="vncell">Enable IEEE802.1X</td>
- <td class="vtable"><input name="ieee8021x" type="checkbox" class="formfld" id="ieee8021x" value="1" <? if (isset($pconfig['ieee8021x'])) echo "checked";?>>
+ <td class="vtable"><input name="ieee8021x" type="checkbox" value="yes" class="formfld" id="ieee8021x" value="1" <? if (isset($pconfig['ieee8021x'])) echo "checked";?>>
<br/>Setting this option will enable 802.1x authentication.
</td>
</tr>
OpenPOWER on IntegriCloud