From 73f5e4f2daa3b80b27d607784cd2dce470314cde Mon Sep 17 00:00:00 2001 From: D9ping Date: Wed, 3 Oct 2018 22:20:06 +0200 Subject: [PATCH] Properly use for attribute for label tags on hostapd page. Added support for id attribute for SelectorOptions function. Signed-off-by: D9ping --- includes/functions.php | 9 +++++++-- includes/hostapd.php | 42 +++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 8f835ab6..98a2d691 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -89,8 +89,13 @@ function isAssoc($arr) { * If $options is an associative array this should be the key * */ -function SelectorOptions($name, $options, $selected = null) { - echo '' , PHP_EOL; foreach ( $options as $opt => $label) { $select = ''; $key = isAssoc($options) ? $opt : $label; diff --git a/includes/hostapd.php b/includes/hostapd.php index a2e9bf79..4ff367a7 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -91,21 +91,21 @@ function DisplayHostAPDConfig()
- +
- - + +
- + +SelectorOptions('hw_mode', $arr80211Standard, $selectedHwMode, 'cbxhwmode'); ?>
- + + SelectorOptions('channel', $selectablechannels, intval($arrConfig['channel']), 'cbxchannel') ?>
@@ -147,20 +147,20 @@ if (in_array($arrConfig['country_code'], $countries_max11channels)) {

- - + +
- - + +
- - + +
@@ -184,24 +184,24 @@ if (in_array($arrConfig['country_code'], $countries_max11channels)) {
-
- + - @@ -454,7 +454,7 @@ if ($arrHostapdConf['LogEnable'] == 1) {