first commit
This commit is contained in:
74
app/views/verify.php
Normal file
74
app/views/verify.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/layout.php';
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header text-center text-white">
|
||||
<i class="bi bi-phone icon-large"></i>
|
||||
<h4 class="mt-2 mb-0">Weryfikacja dwuskładnikowa</h4>
|
||||
</div>
|
||||
<div class="card-body p-4">
|
||||
<?php if (isset($error)): ?>
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<i class="bi bi-exclamation-triangle-fill me-2"></i>
|
||||
<?= htmlspecialchars($error) ?>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<i class="bi bi-envelope-fill me-2"></i>
|
||||
Kod weryfikacyjny został wysłany na adres e-mail powiązany z kontem
|
||||
<strong><?= htmlspecialchars($userLogin) ?></strong>.
|
||||
</div>
|
||||
|
||||
<?php if (isset($simulatedCode)): ?>
|
||||
<div class="mb-4">
|
||||
<label class="form-label text-muted">
|
||||
<i class="bi bi-bug-fill me-1"></i>Kod testowy (symulacja):
|
||||
</label>
|
||||
<div class="code-display">
|
||||
<?= htmlspecialchars($simulatedCode) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST" action="/zweryfikuj">
|
||||
<div class="mb-4">
|
||||
<label for="code" class="form-label">
|
||||
<i class="bi bi-123 me-1"></i>Kod weryfikacyjny
|
||||
</label>
|
||||
<input type="text" class="form-control form-control-lg text-center"
|
||||
id="code" name="code" maxlength="6"
|
||||
placeholder="000000" required autofocus
|
||||
style="letter-spacing: 0.5rem; font-size: 1.5rem;">
|
||||
</div>
|
||||
<div class="d-grid gap-2">
|
||||
<button type="submit" class="btn btn-primary btn-lg">
|
||||
<i class="bi bi-check-circle me-2"></i>Zweryfikuj
|
||||
</button>
|
||||
<a href="/wyloguj-sie" class="btn btn-outline-secondary">
|
||||
<i class="bi bi-arrow-left me-2"></i>Anuluj i wróć
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-footer text-center text-muted bg-transparent border-0 pb-4">
|
||||
<small>
|
||||
<i class="bi bi-clock me-1"></i>
|
||||
Kod jest ważny przez 10 minut
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('code').addEventListener('input', function(e) {
|
||||
this.value = this.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
renderLayout('Weryfikacja', $content);
|
||||
Reference in New Issue
Block a user