Process templates w/ bootstrap-5-migrate-tool

This commit is contained in:
billz
2024-10-24 00:06:13 -07:00
parent bf22668284
commit 4799825738
46 changed files with 293 additions and 293 deletions

View File

@@ -6,20 +6,20 @@
<div class="col-lg-12 mt-2">
<div class="row mt-3 mb-2">
<div class="info-item col-xs-3"><?php echo _("IPv4 Address"); ?></div>
<div class="info-value col-xs-3"><?php echo htmlspecialchars($public_ip, ENT_QUOTES); ?><a class="text-gray-500" href="https://ipapi.co/<?php echo($public_ip); ?>" target="_blank" rel="noopener noreferrer"><i class="fas fa-external-link-alt ml-2"></i></a></div>
<div class="info-value col-xs-3"><?php echo htmlspecialchars($public_ip, ENT_QUOTES); ?><a class="text-gray-500" href="https://ipapi.co/<?php echo($public_ip); ?>" target="_blank" rel="noopener noreferrer"><i class="fas fa-external-link-alt ms-2"></i></a></div>
</div>
</div>
<h5><?php echo _("Configuration Method"); ?></h5>
<div class="col-sm-12 mt-2 mb-2 form-check">
<input class="form-check-input" id="wg-upload" name="wgCnfOpt" value="upload" data-toggle="" data-parent="#serversettings" data-target="#wgUpload" type="radio" checked>
<input class="form-check-input" id="wg-upload" name="wgCnfOpt" value="upload" data-bs-toggle="" data-parent="#serversettings" data-bs-target="#wgUpload" type="radio" checked>
<label class="form-check-label"><?php echo _("Upload file"); ?></label>
</div>
<div class="col-sm-12 mt-2 mb-2 form-check">
<input class="form-check-input" id="wg-manual" name="wgCnfOpt" value="manual" data-toggle="" data-parent="#serversettings" data-target="#wgManual" type="radio">
<input class="form-check-input" id="wg-manual" name="wgCnfOpt" value="manual" data-bs-toggle="" data-parent="#serversettings" data-bs-target="#wgManual" type="radio">
<label class="form-check-label"><?php echo _("Create manually"); ?></label>
</div>
<div class="col-sm-12 ml-2">
<div class="col-sm-12 ms-2">
<div class="panel-group" id="serversettings">
<div class="panel panel-default panel-collapse" id="PanelUpload">
@@ -31,23 +31,23 @@
</div>
<div class="panel-body">
<div class="form-group">
<div class="custom-control custom-switch">
<div class="mb-3">
<div class="form-check form-switch">
<?php $checked = $optRules == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxwgrules" name="wgRules" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxwgrules"><?php echo _("Apply iptables rules for AP interface"); ?></label>
<i class="fas fa-question-circle text-muted" data-toggle="tooltip" data-placement="auto" title="<?php echo _("Recommended if you wish to forward network traffic from the wg0 interface to clients connected on the AP interface."); ?>"></i>
<input class="form-check-input" id="chxwgrules" name="wgRules" type="checkbox" value="1" <?php echo $checked ?> />
<label class="form-check-label" for="chxwgrules"><?php echo _("Apply iptables rules for AP interface"); ?></label>
<i class="fas fa-question-circle text-muted" data-bs-toggle="tooltip" data-bs-placement="auto" title="<?php echo _("Recommended if you wish to forward network traffic from the wg0 interface to clients connected on the AP interface."); ?>"></i>
<p id="wg-description">
<small><?php printf(_("This option adds <strong>iptables</strong> <code>Postup</code> and <code>PostDown</code> rules for the configured AP interface (%s)."), $_SESSION['ap_interface']) ?></small>
</p>
</div>
</div>
<div class="form-group">
<div class="mb-3">
<h5 class="panel-title"><?php echo _("Configuration File"); ?></h4>
<div class="custom-file">
<input type="file" class="custom-file-input" name="wgFile" id="wgFile">
<label class="custom-file-label" for="wgFile"><?php echo _("Select WireGuard configuration file (.conf)"); ?></label>
<input type="file" class="form-control" name="wgFile" id="wgFile">
<label class="form-label" for="wgFile"><?php echo _("Select WireGuard configuration file (.conf)"); ?></label>
</div>
</div>
<div class="row mb-2"></div>
@@ -59,9 +59,9 @@
<div class="panel-heading">
<h5 class="panel-title"><?php echo _("Create a local WireGuard config"); ?></h5>
<div class="input-group">
<div class="custom-control custom-switch">
<input class="custom-control-input" id="server_enabled" type="checkbox" name="wgSrvEnable" value="1" <?php echo $wg_senabled ? ' checked="checked"' : "" ?> aria-describedby="server-description">
<label class="custom-control-label" for="server_enabled"><?php echo _("Enable server") ?></label>
<div class="form-check form-switch">
<input class="form-check-input" id="server_enabled" type="checkbox" name="wgSrvEnable" value="1" <?php echo $wg_senabled ? ' checked="checked"' : "" ?> aria-describedby="server-description">
<label class="form-check-label" for="server_enabled"><?php echo _("Enable server") ?></label>
</div>
<p id="wg-description">
<small>
@@ -77,21 +77,21 @@
<div class="input-group col-md-12 mb-3">
<input type="text" class="form-control" name="wg-server" id="wg-srvpubkey" value="<?php echo htmlspecialchars($wg_srvpubkey, ENT_QUOTES); ?>" />
<div class="input-group-append">
<button class="btn btn-outline-secondary rounded-right wg-keygen" type="button"><i class="fas fa-magic"></i></button>
<span id="wg-server-pubkey-status" class="input-group-addon check-hidden ml-2 mt-1"><i class="fas fa-check"></i></span>
<button class="btn btn-outline-secondary rounded-end wg-keygen" type="button"><i class="fas fa-magic"></i></button>
<span id="wg-server-pubkey-status" class="input-group-addon check-hidden ms-2 mt-1"><i class="fas fa-check"></i></span>
</div>
</div>
</div>
<div class="form-group col-xs-3 col-sm-3">
<div class="mb-3 col-xs-3 col-sm-3">
<label for="code"><?php echo _("Local Port"); ?></label>
<input type="text" class="form-control" name="wg_srvport" value="<?php echo htmlspecialchars($wg_srvport, ENT_QUOTES); ?>" />
</div>
<div class="form-group col-md-6">
<div class="mb-3 col-md-6">
<label for="code"><?php echo _("IP Address"); ?></label>
<input type="text" class="form-control" name="wg_srvipaddress" value="<?php echo htmlspecialchars($wg_srvipaddress, ENT_QUOTES); ?>" />
</div>
<div class="form-group col-md-6">
<div class="mb-3 col-md-6">
<label for="code"><?php echo _("DNS"); ?></label>
<input type="text" class="form-control" name="wg_srvdns" value="<?php echo htmlspecialchars($wg_srvdns, ENT_QUOTES); ?>" />
</div>

View File

@@ -4,9 +4,9 @@
<div class="col-md-12">
<h4 class="mt-3"><?php echo _("Logging"); ?></h4>
<p><?php echo _("Enable this option to display an updated <code>wg-quick</code> debug log.") ?></p>
<div class="custom-control custom-switch">
<input class="custom-control-input" id="wgLogEnable" type="checkbox" name="wgLogEnable" value="1" <?php echo $optLogEnable ? ' checked="checked"' : "" ?> aria-describedby="wgLogEnable">
<label class="custom-control-label" for="wgLogEnable"><?php echo _("Logfile output") ?></label>
<div class="form-check form-switch">
<input class="form-check-input" id="wgLogEnable" type="checkbox" name="wgLogEnable" value="1" <?php echo $optLogEnable ? ' checked="checked"' : "" ?> aria-describedby="wgLogEnable">
<label class="form-check-label" for="wgLogEnable"><?php echo _("Logfile output") ?></label>
</div>
<?php
exec('sudo chmod o+r /tmp/wireguard.log');

View File

@@ -5,9 +5,9 @@
<h4 class="mt-3"><?php echo _("Peer"); ?></h4>
<div class="input-group">
<input type="hidden" name="peer_id" value="1">
<div class="custom-control custom-switch">
<input class="custom-control-input" id="peer_enabled" type="checkbox" name="wg_penabled" value="1" <?php echo $wg_penabled ? ' checked="checked"' : "" ?> aria-describedby="endpoint-description">
<label class="custom-control-label" for="peer_enabled"><?php echo _("Enable peer") ?></label>
<div class="form-check form-switch">
<input class="form-check-input" id="peer_enabled" type="checkbox" name="wg_penabled" value="1" <?php echo $wg_penabled ? ' checked="checked"' : "" ?> aria-describedby="endpoint-description">
<label class="form-check-label" for="peer_enabled"><?php echo _("Enable peer") ?></label>
</div>
<p id="wg-description">
<small><?php echo _("Enable this option to encrypt traffic by creating a tunnel between RaspAP and this peer.") ?></small>
@@ -22,28 +22,28 @@
<div class="input-group col-md-12">
<input type="text" class="form-control" name="wg-peer" id="wg-peerpubkey" value="<?php echo htmlspecialchars($wg_peerpubkey, ENT_QUOTES); ?>" />
<div class="input-group-append">
<button class="btn btn-outline-secondary rounded-right wg-keygen" type="button"><i class="fas fa-magic"></i></button>
<span id="wg-peer-pubkey-status" class="input-group-addon check-hidden ml-2 mt-1"><i class="fas fa-check"></i></span>
<button class="btn btn-outline-secondary rounded-end wg-keygen" type="button"><i class="fas fa-magic"></i></button>
<span id="wg-peer-pubkey-status" class="input-group-addon check-hidden ms-2 mt-1"><i class="fas fa-check"></i></span>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-xs-3 col-sm-3 mt-3">
<div class="mb-3 col-xs-3 col-sm-3 mt-3">
<label for="code"><?php echo _("Local Port"); ?></label>
<input type="text" class="form-control" name="wg_plistenport" value="<?php echo htmlspecialchars($wg_plistenport, ENT_QUOTES); ?>" />
</div>
</div>
<div class="row">
<div class="form-group col-xs-3 col-sm-6">
<div class="mb-3 col-xs-3 col-sm-6">
<label for="code"><?php echo _("IP Address"); ?></label>
<input type="text" class="form-control" name="wg_pipaddress" value="<?php echo htmlspecialchars($wg_pipaddress, ENT_QUOTES); ?>" />
</div>
</div>
<div class="row">
<div class="form-group col-xs-3 col-sm-6">
<div class="mb-3 col-xs-3 col-sm-6">
<label for="code"><?php echo _("Endpoint address"); ?></label>
<input type="text" class="form-control" name="wg_pendpoint" value="<?php echo htmlspecialchars($wg_pendpoint, ENT_QUOTES); ?>" />
</div>
@@ -65,14 +65,14 @@
</div>
<div class="col-md-6 mt-5">
<figure class="figure w-75 ml-3">
<figure class="figure w-75 ms-3">
<?php if ($wg_penabled == true ) : ?>
<img src="app/img/wg-qr-code.php" class="figure-img img-fluid" alt="RaspAP Wifi QR code" style="width:100%;">
<figcaption class="figure-caption">
<?php echo _("Scan this QR code with your client to connect to this tunnel"); ?>
<?php echo _("or download the <code>client.conf</code> file to your device."); ?>
</figcaption>
<button class="btn btn-outline-secondary rounded-right wg-client-dl mt-2" type="button"><?php echo _("Download"); ?> <i class="fas fa-download ml-1"></i></button>
<button class="btn btn-outline-secondary rounded-end wg-client-dl mt-2" type="button"><?php echo _("Download"); ?> <i class="fas fa-download ms-1"></i></button>
<?php endif; ?>
</figure>
</div>