2021-05-31 00:46:10 +02:00
|
|
|
<?php if (empty($networks)): ?>
|
2020-12-06 09:27:18 +01:00
|
|
|
<div class="col-md-6 ml-6">
|
|
|
|
<p class="lead text-center"><?php echo _('No Wifi stations found') ?></p>
|
2021-04-30 15:40:47 +02:00
|
|
|
<p class="text-center"><?php echo _("Click 'Rescan' to search for nearby Wifi stations.") ?></p>
|
2021-05-08 20:40:19 +02:00
|
|
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
2021-04-30 15:40:47 +02:00
|
|
|
<p class="text-center"><?php echo _("Click 'Reinitialize' to force reinitialize <code>wpa_supplicant</code>.") ?></p>
|
2021-04-30 09:38:49 +02:00
|
|
|
<form method="POST" action="wpa_conf" name="wpa_conf_form" class="row">
|
2021-05-08 20:40:19 +02:00
|
|
|
<?php echo CSRFTokenFieldTag() ?>
|
2021-04-30 09:38:49 +02:00
|
|
|
<div class="col-xs mr-3 mb-3">
|
|
|
|
<input type="submit" class="btn btn-warning btn-block float-right" name="wpa_reinit" value="<?php echo _("Re-initialize"); ?>" />
|
|
|
|
</div>
|
|
|
|
</form>
|
2021-05-08 20:40:19 +02:00
|
|
|
<?php endif ?>
|
2020-12-06 09:27:18 +01:00
|
|
|
</div>
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php endif ?>
|
2019-08-08 02:10:40 +02:00
|
|
|
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php if (!empty($connected)): ?>
|
|
|
|
<h4 class="h-underlined my-3"><?php echo _("Connected") ?></h4>
|
2021-06-01 04:01:10 +02:00
|
|
|
<div class="card-grid">
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php foreach ($connected as $network) : ?>
|
2021-08-31 16:57:46 +02:00
|
|
|
<?php $index = isset($network['index']) ? $network['index'] : -1; ?>
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php echo renderTemplate("wifi_stations/network", compact('network', 'index')) ?>
|
|
|
|
<?php $index++; ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if (!empty($known)): ?>
|
|
|
|
<h4 class="h-underlined my-3"><?php echo _("Known") ?></h4>
|
2021-06-01 04:01:10 +02:00
|
|
|
<div class="card-grid">
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php foreach ($known as $network) : ?>
|
2021-08-31 16:57:46 +02:00
|
|
|
<?php $index = isset($network['index']) ? $network['index'] : -1; ?>
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php echo renderTemplate("wifi_stations/network", compact('network', 'index')) ?>
|
|
|
|
<?php $index++; ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if (!empty($nearby)): ?>
|
|
|
|
<h4 class="h-underlined my-3"><?php echo _("Nearby") ?></h4>
|
2021-06-01 04:01:10 +02:00
|
|
|
<div class="card-grid">
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php foreach ($nearby as $network) : ?>
|
2021-08-31 16:57:46 +02:00
|
|
|
<?php $index = isset($network['index']) ? $network['index'] : -1; ?>
|
2021-05-31 00:46:10 +02:00
|
|
|
<?php echo renderTemplate("wifi_stations/network", compact('network', 'index')) ?>
|
|
|
|
<?php $index++; ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2021-09-30 12:04:57 +02:00
|
|
|
|
|
|
|
<h4 class="h-underlined my-3"><?php echo _("Add Custom Network") ?></h4>
|
|
|
|
<div class="card-grid">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
<input type="hidden" name="protocol<?php echo $index ?>" value="<?php echo htmlspecialchars($network ['protocol'], ENT_QUOTES); ?>" />
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="info-item-wifi"><?php echo _("SSID"); ?></div>
|
|
|
|
<input type="text" class="form-control" name="ssid<?php echo $index ?>" data-colors="#ffd0d0,#d0ffd0"/>
|
|
|
|
<div class="info-item-wifi"><?php echo _("Passphrase"); ?></div>
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="password" class="form-control js-validate-psk" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" data-target="#update<?php echo $index ?>" data-colors="#ffd0d0,#d0ffd0">
|
|
|
|
<div class="input-group-append">
|
|
|
|
<button class="btn btn-outline-secondary js-toggle-password" type="button" data-target="[name=passphrase<?php echo $index ?>]" data-toggle-with="<?php echo _("Hide") ?>">Show</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="btn-group btn-block ">
|
|
|
|
<input type="submit" class="col-xs-4 col-md-4 btn btn-info" value="<?php echo _("Add"); ?>" id="update<?php echo $index ?>" name="update<?php echo $index ?>" data-toggle="modal" data-target="#configureClientModal" />
|
|
|
|
</div><!-- /.btn-group -->
|
|
|
|
</div><!-- /.card-body -->
|
|
|
|
</div><!-- /.card -->
|
|
|
|
|
|
|
|
<?php $index++; ?>
|
|
|
|
|
|
|
|
</div>
|