Browse Source

Add operatingSystem check to bridge option

pull/1183/head
billz 5 months ago
parent
commit
7674feaf61
  1. 4
      includes/hostapd.php
  2. 3
      templates/hostapd/advanced.php

4
includes/hostapd.php

@ -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"
)
);
}

3
templates/hostapd/advanced.php

@ -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>

Loading…
Cancel
Save