1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Add operatingSystem check to bridge option

This commit is contained in:
billz 2022-06-22 11:50:00 +01:00
parent a4960f89ac
commit 7674feaf61
2 changed files with 5 additions and 2 deletions

View File

@ -18,6 +18,7 @@ function DisplayHostAPDConfig()
{
$status = new StatusMessages();
$system = new \RaspAP\System\Sysinfo;
$operatingSystem = $system->operatingSystem();
$arrConfig = array();
$arr80211Standard = [
'a' => '802.11a - 5 GHz',
@ -122,7 +123,8 @@ function DisplayHostAPDConfig()
"arrEncType",
"arrTxPower",
"txpower",
"arrHostapdConf"
"arrHostapdConf",
"operatingSystem"
)
);
}

View File

@ -4,7 +4,8 @@
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['BridgedEnable'] == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxbridgedenable" name="bridgedEnable" type="checkbox" value="1" <?php echo $checked ?> />
<?php $disabled = strpos(strtolower($operatingSystem),'ubuntu') !== false ? 'disabled="disabled"' : '' ?>
<input class="custom-control-input" id="chxbridgedenable" name="bridgedEnable" type="checkbox" value="1" <?php echo $checked ?> <?php echo $disabled ?> />
<label class="custom-control-label" for="chxbridgedenable"><?php echo _("Bridged AP mode"); ?></label>
</div>
</div>