mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Properly use for attribute for label tags on hostapd page.
Added support for id attribute for SelectorOptions function. Signed-off-by: D9ping <D9ping@users.noreply.github.com>
This commit is contained in:
@@ -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 '<select class="form-control" name="'.htmlspecialchars($name, ENT_QUOTES).'">' , PHP_EOL;
|
||||
function SelectorOptions($name, $options, $selected = null, $id = null) {
|
||||
echo '<select class="form-control" name="'.htmlspecialchars($name, ENT_QUOTES).'"';
|
||||
if (isset($id)) {
|
||||
echo ' id="' . htmlspecialchars($id, ENT_QUOTES) .'"';
|
||||
}
|
||||
|
||||
echo '>' , PHP_EOL;
|
||||
foreach ( $options as $opt => $label) {
|
||||
$select = '';
|
||||
$key = isAssoc($options) ? $opt : $label;
|
||||
|
Reference in New Issue
Block a user