2021-02-06 09:18:27 +01:00
|
|
|
<div class="tab-pane fade" id="openvpnconfigs">
|
2021-02-07 16:24:45 +01:00
|
|
|
<div class="row">
|
2021-02-07 19:51:21 +01:00
|
|
|
<div class="col-md">
|
2021-02-07 16:24:45 +01:00
|
|
|
<h4 class="mt-3 mb-3"><?php echo _("Configurations"); ?></h4>
|
|
|
|
<p id="openvpnconfigs-description" class="mb-3">
|
|
|
|
<small><?php echo _("Currently available OpenVPN client configurations are displayed below.") ?></small>
|
2023-08-26 15:05:07 +02:00
|
|
|
<br><small class="text-muted"><?php echo _("Activating a configuration will restart the <code>openvpn-client</code> service.") ?></small>
|
2021-02-07 16:24:45 +01:00
|
|
|
</p>
|
|
|
|
<div class="openvpn-configs js-openvpn-configs-container">
|
2021-02-07 19:51:21 +01:00
|
|
|
<?php foreach ($clients as $client) :
|
2021-06-12 14:36:03 +02:00
|
|
|
if ($client == $conf_default) {
|
2021-02-07 19:51:21 +01:00
|
|
|
$btn_class = "active";
|
|
|
|
} else {
|
|
|
|
$btn_class = "disabled";
|
2021-06-12 14:36:03 +02:00
|
|
|
}
|
|
|
|
$label = preg_replace('/_client$/','',pathinfo($client, PATHINFO_FILENAME));
|
|
|
|
$client = $label;
|
|
|
|
?>
|
2021-02-07 19:51:21 +01:00
|
|
|
<div class="row mt-2" id="openvpn-client-row-<?php echo htmlspecialchars($client, ENT_QUOTES); ?>" >
|
|
|
|
<div class="col-md-6 col-xs-4">
|
2021-02-07 16:24:45 +01:00
|
|
|
<label><?php echo htmlspecialchars($label, ENT_QUOTES); ?></label>
|
|
|
|
</div>
|
2021-02-07 19:51:21 +01:00
|
|
|
<div class="col-md-auto px-lg-3 col-xs-2">
|
2021-02-07 16:24:45 +01:00
|
|
|
<button type="button" class="btn btn-outline-success <?php echo $btn_class; ?> js-activate-openvpn-client" data-record-id="<?php echo htmlspecialchars($client, ENT_QUOTES); ?>" data-toggle="modal" data-target="#ovpn-confirm-activate" /><i class="far fa-check-circle"></i></button>
|
|
|
|
</div>
|
2021-02-07 19:51:21 +01:00
|
|
|
<div class="col-md-auto col-xs-2">
|
2021-02-07 16:24:45 +01:00
|
|
|
<button type="button" class="btn btn-outline-danger js-remove-openvpn-client" data-record-id="<?php echo htmlspecialchars($client, ENT_QUOTES); ?>" data-toggle="modal" data-target="#ovpn-confirm-delete" /><i class="far fa-trash-alt"></i></button>
|
|
|
|
</div>
|
2021-02-07 19:51:21 +01:00
|
|
|
</div><!-- ./row openvpn-client -->
|
2021-02-07 16:24:45 +01:00
|
|
|
<?php endforeach ?>
|
|
|
|
</div><!-- /.openvpn-configs -->
|
|
|
|
<div class="mb-3"></div>
|
|
|
|
</div><!-- /.tab-pane | manage configs tab -->
|
2021-02-07 12:52:58 +01:00
|
|
|
</div>
|
2021-02-07 16:24:45 +01:00
|
|
|
</div>
|