Correct internet device GUI and udev config

This commit is contained in:
Christian Zeitnitz
2021-03-10 23:45:04 +01:00
parent e8d0fab463
commit 76e2eecaec
9 changed files with 46 additions and 35 deletions

View File

@@ -107,7 +107,7 @@
<?php endif; ?>
<?php foreach (array_slice($clients,0, 2) as $client) : ?>
<tr>
<?php if ($arrHostapdConf['BridgedEnable'] == 1): ?>
<?php if ($bridgedEnable == 1): ?>
<td><?php echo htmlspecialchars($client, ENT_QUOTES) ?></td>
<?php else : ?>
<?php $props = explode(' ', $client) ?>

View File

@@ -13,8 +13,8 @@
<ul class="nav nav-tabs">
<li role="presentation" class="nav-item"><a class="nav-link active" href="#summary" aria-controls="summary" role="tab" data-toggle="tab"><?php echo _("Summary"); ?></a></li>
<?php if (!$bridgedEnabled) : // no interface details when bridged ?>
<li role="presentation" class="nav-item"><a class="nav-link" href="#mobiledata" aria-controls="mobiledata" role="tab" data-toggle="tab">Mobile Data Settings</a></li>
<li role="presentation" class="nav-item"><a class="nav-link" href="#netdevices" aria-controls="netdevices" role="tab" data-toggle="tab">Network Devices</a></li>
<li role="presentation" class="nav-item"><a class="nav-link" href="#mobiledata" aria-controls="mobiledata" role="tab" data-toggle="tab">Mobile Data Settings</a></li>
<?php endif ?>
</ul>
<div class="tab-content">
@@ -84,31 +84,6 @@
<?php $arrMD = parse_ini_file('/etc/raspap/networking/mobiledata.ini');
if ($arrMD==false) { $arrMD=[]; $arrMD["pin"]=$arrMD["apn"]=$arrMD["apn_user"]=$arrMD["apn_pw"]=$arrMD["router_user"]=$arrMD["router_pw"]=""; }
?>
<div role="tabpanel" class="tab-pane fade in" id="mobiledata">
<div class="row">
<div class="col-lg-6">
<h4 class="mt-3"><?php echo _("Settings for Mobile Data Devices") ?></h4>
<hr />
<form id="frm-mobiledata">
<?php echo CSRFTokenFieldTag() ?>
<div class="form-group">
<label for="pin-mobile"><?php echo _("PIN of SIM card") ?></label>
<input type="number" class="form-control" id="pin-mobile" placeholder="1234" value="<?php echo $arrMD["pin"]?>" >
</div>
<h4 class="mt-3"><?php echo _("APN Settings (Modem device ppp0)") ?></h4>
<div class="form-group">
<label for="apn-mobile"><?php echo _("Access Point Name (APN)") ?></label>
<input type="text" class="form-control" id="apn-mobile" placeholder="web.myprovider.com" value="<?php echo $arrMD["apn"]?>" >
<label for="apn-user-mobile"><?php echo _("Username") ?></label>
<input type="text" class="form-control" id="apn-user-mobile" value="<?php echo $arrMD["apn_user"]?>" >
<label for="apn-pw-mobile"><?php echo _("Password") ?></label>
<input type="text" class="form-control" id="apn-pw-mobile" value="<?php echo $arrMD["apn_pw"]?>" >
</div>
<a href="#" class="btn btn-outline btn-primary intsave" data-int="mobiledata"><?php echo _("Save settings") ?></a>
</form>
</div>
</div>
</div><!-- /.tab-panel -->
<div role="tabpanel" class="tab-pane fade in" id="netdevices">
<h4 class="mt-3"><?php echo _("Properties of network devices") ?></h4>
<div class="row">
@@ -194,6 +169,31 @@
</div>
</div>
</div><!-- /.tab-panel -->
<div role="tabpanel" class="tab-pane fade in" id="mobiledata">
<div class="row">
<div class="col-lg-6">
<h4 class="mt-3"><?php echo _("Settings for Mobile Data Devices") ?></h4>
<hr />
<form id="frm-mobiledata">
<?php echo CSRFTokenFieldTag() ?>
<div class="form-group">
<label for="pin-mobile"><?php echo _("PIN of SIM card") ?></label>
<input type="number" class="form-control" id="pin-mobile" placeholder="1234" value="<?php echo $arrMD["pin"]?>" >
</div>
<h4 class="mt-3"><?php echo _("APN Settings (Modem device ppp0)") ?></h4>
<div class="form-group">
<label for="apn-mobile"><?php echo _("Access Point Name (APN)") ?></label>
<input type="text" class="form-control" id="apn-mobile" placeholder="web.myprovider.com" value="<?php echo $arrMD["apn"]?>" >
<label for="apn-user-mobile"><?php echo _("Username") ?></label>
<input type="text" class="form-control" id="apn-user-mobile" value="<?php echo $arrMD["apn_user"]?>" >
<label for="apn-pw-mobile"><?php echo _("Password") ?></label>
<input type="text" class="form-control" id="apn-pw-mobile" value="<?php echo $arrMD["apn_pw"]?>" >
</div>
<a href="#" class="btn btn-outline btn-primary intsave" data-int="mobiledata"><?php echo _("Save settings") ?></a>
</form>
</div>
</div>
</div><!-- /.tab-panel -->
</div>
</div><!-- /.card-body -->
<div class="card-footer"><?php echo _("Information provided by /sys/class/net"); ?></div>