jilo-web/app/templates/form-login.php

45 lines
2.7 KiB
PHP
Raw Normal View History

2024-08-07 08:13:55 +00:00
<!-- login form -->
2025-11-19 17:54:16 +00:00
<div class="auth-card mx-auto">
<div class="auth-card-body">
<div class="auth-header">
<p class="auth-eyebrow">Welcome back</p>
<h2 class="auth-title">Sign in to <?= htmlspecialchars($config['site_name']); ?></h2>
<p class="auth-subtitle">Enter your credentials to continue</p>
</div>
<form method="POST" action="<?= htmlspecialchars($app_root) ?>?page=login" class="auth-form" novalidate>
<?php include CSRF_TOKEN_INCLUDE; ?>
2025-11-19 17:54:16 +00:00
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<div class="input-group auth-input-group">
<span class="input-group-text"><i class="fas fa-user"></i></span>
<input type="text" id="username" class="form-control" name="username" placeholder="Username"
pattern="[A-Za-z0-9_\-]{3,20}" title="3-20 characters, letters, numbers, - and _"
value="<?= htmlspecialchars($_POST['username'] ?? '') ?>"
required />
</div>
2025-01-30 16:48:46 +00:00
</div>
2025-11-19 17:54:16 +00:00
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<div class="input-group auth-input-group">
<span class="input-group-text"><i class="fas fa-lock"></i></span>
<input type="password" id="password" class="form-control" name="password" placeholder="Password"
pattern=".{8,}" title="Eight or more characters"
required />
</div>
2025-01-30 16:48:46 +00:00
</div>
2025-11-19 17:54:16 +00:00
<div class="d-flex justify-content-between align-items-center mb-4 auth-remember">
<label class="form-check-label" for="remember_me">
<input class="form-check-input" type="checkbox" id="remember_me" name="remember_me" />
Remember me
2025-01-30 16:48:46 +00:00
</label>
2025-11-19 17:54:16 +00:00
<a class="auth-link" href="?page=login&action=forgot">Forgot password?</a>
2025-01-30 16:48:46 +00:00
</div>
<?php if (isset($_GET['redirect'])): ?>
<input type="hidden" name="redirect" value="<?php echo htmlspecialchars($_GET['redirect']); ?>">
<?php endif; ?>
2025-11-19 17:54:16 +00:00
<button type="submit" class="btn btn-primary auth-submit w-100">Login</button>
2024-08-07 08:13:55 +00:00
</form>
</div>
2024-08-06 07:40:52 +00:00
</div>
2024-08-07 08:13:55 +00:00
<!-- /login form -->