- Introduced new styles for the login page, enhancing layout and responsiveness. - Updated the login view to utilize the new styles and improve user feedback for login errors and success messages. - Removed unused controllers and views related to contact and login functionalities to streamline the codebase. - Adjusted error message handling in the AuthController for better clarity on password requirements.
35 lines
1.4 KiB
PHTML
35 lines
1.4 KiB
PHTML
<?php
|
|
include dirname(__DIR__).'/header.phtml';
|
|
?>
|
|
|
|
<div class="login-page-bg">
|
|
<div class="login-container">
|
|
<h2 class="login-title">Login</h2>
|
|
<?php if (!empty($errors['login'])): ?>
|
|
<div class="login-error">
|
|
<?php echo htmlspecialchars($errors['login']); ?>
|
|
</div>
|
|
<?php elseif (!empty($loginSuccess)): ?>
|
|
<div class="login-success">
|
|
<p>Login für Benutzer <?php echo htmlspecialchars($_SESSION["user"]); ?> erfolgreich</p>
|
|
<a class="login-link" href="?controller=Welcome&do=showWelcome">Weiter</a>
|
|
</div>
|
|
<?php else: ?>
|
|
<form method="post" class="login-form">
|
|
<input type="hidden" name="controller" value="Auth">
|
|
<input type="hidden" name="do" value="login">
|
|
<div class="login-field">
|
|
<label for="email">E-Mail:</label>
|
|
<input type="email" name="email" id="email" value="<?= htmlspecialchars($validData['email'] ?? '') ?>">
|
|
</div>
|
|
<div class="login-field">
|
|
<label for="password">Passwort:</label>
|
|
<input type="password" name="password" id="password">
|
|
</div>
|
|
<button class="login-btn" type="submit">Einloggen</button>
|
|
</form>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php include dirname(__DIR__).'/footer.phtml'; ?> |