andom-tec changes

This commit is contained in:
Frank Schubert
2024-12-24 12:38:29 +01:00
parent aff469924e
commit ee0037835c
24 changed files with 5518 additions and 298 deletions

View File

@@ -127,60 +127,64 @@ if ($userprofile->twofactor == 0) {
</div>
</div>
</form>
<div class="w-100 border-bottom"></div>
<h4 class="form-group mb-2 mt-3">2FA</h4>
<?php if (!$verification || $verification == 0): ?>
<?php if(!$userprofile->twofactor): ?>
<div class="alert alert-danger"><i class="fas fa-exclamation-circle"></i> Derzeit ist keine Methode für die Zwei-Faktor-Authentifizerung aktiviert. Bitte aktivieren Sie eine Zwei-Faktor-Authentifizerungsmethode!</div>
<?php if(defined("TT_WORKER_FORCE_2FA") && TT_WORKER_FORCE_2FA): ?>
<div class="w-100 border-bottom"></div>
<h4 class="form-group mb-2 mt-3">2FA</h4>
<?php if (!$verification || $verification == 0): ?>
<?php if(!$userprofile->twofactor): ?>
<div class="alert alert-danger"><i class="fas fa-exclamation-circle"></i> Derzeit ist keine Methode für die Zwei-Faktor-Authentifizerung aktiviert. Bitte aktivieren Sie eine Zwei-Faktor-Authentifizerungsmethode!</div>
<?php endif; ?>
<form class="form-horizontal" method="post"
action="<?= self::getUrl("UserProfile", $twoFactorFormaction) ?>">
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="twofactor"><?= $twoFactorsym ?>
Zwei-Faktor-Authentifizierung</label>
<?= $twoFactortype ?>
<div class="col-lg-7">
<?= $twoFactorbtn ?>
</div>
</div>
</form>
<?php elseif ($verification == 1 || $verification == 2) :
if ($verification == 1) {
$verificationType = "Email";
} elseif ($verification == 2) {
$verificationType = "SMS";
}
?>
<form class="form-horizontal" method="post"
action="<?= self::getUrl("UserProfile", "activate2faaction") ?>">
<div class="row">
<div class="col-lg-2"></div>
<label class="col-lg-3 col-form-label"
style="vertical-align: top;font-size: 15px;color: #000;"> Code wurde
per <?php echo $verificationType; ?> verschickt (5 Minuten gültig)</label>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="code">Verifizierungscode: <i
data-codetype="<?= $verification ?>"
class="fa-solid fa-arrows-rotate fa-new-code" id="new-authcode"
title="Neuen Code anfordern."></i></label>
<div class="col-lg-2">
<input type="number" required min="0" max="99999" class="form-control"
name="code"
id="code"
value="">
<input type="hidden" name="twofactor" value="<?php echo $verification; ?>"/>
</div>
<div class="col-lg-7 check-button">
<?= $twoFactorbtn ?>
<a href="<?= self::getUrl("UserProfile") ?>">
<button type="button" class="btn btn-secondary mb-3">Abbrechen</button>
</a>
</div>
</div>
</form>
<?php endif; ?>
<form class="form-horizontal" method="post"
action="<?= self::getUrl("UserProfile", $twoFactorFormaction) ?>">
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="twofactor"><?= $twoFactorsym ?>
Zwei-Faktor-Authentifizierung</label>
<?= $twoFactortype ?>
<div class="col-lg-7">
<?= $twoFactorbtn ?>
</div>
</div>
</form>
<?php elseif ($verification == 1 || $verification == 2) :
if ($verification == 1) {
$verificationType = "Email";
} elseif ($verification == 2) {
$verificationType = "SMS";
}
?>
<form class="form-horizontal" method="post"
action="<?= self::getUrl("UserProfile", "activate2faaction") ?>">
<div class="row">
<div class="col-lg-2"></div>
<label class="col-lg-3 col-form-label"
style="vertical-align: top;font-size: 15px;color: #000;"> Code wurde
per <?php echo $verificationType; ?> verschickt (5 Minuten gültig)</label>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="code">Verifizierungscode: <i
data-codetype="<?= $verification ?>"
class="fa-solid fa-arrows-rotate fa-new-code" id="new-authcode"
title="Neuen Code anfordern."></i></label>
<div class="col-lg-2">
<input type="number" required min="0" max="99999" class="form-control"
name="code"
id="code"
value="">
<input type="hidden" name="twofactor" value="<?php echo $verification; ?>"/>
</div>
<div class="col-lg-7 check-button">
<?= $twoFactorbtn ?>
<a href="<?= self::getUrl("UserProfile") ?>">
<button type="button" class="btn btn-secondary mb-3">Abbrechen</button>
</a>
</div>
</div>
</form>
<?php endif; ?>
</div>
</div>