Änderungen von templates und Hinzufügen von Validation
This commit is contained in:
@@ -4,17 +4,32 @@
|
||||
|
||||
<h1>Als Benutzer anmelden</h1>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="form-grid">
|
||||
|
||||
<label for="reg_email">Email:</label>
|
||||
<input type="email" name="email" id="reg_email" required>
|
||||
<?php foreach ($labels as $key => $label): ?>
|
||||
<div class="input">
|
||||
<label for="reg_<?= $key ?>"><?= $label ?></label>
|
||||
<?php if ($key === 'password'): ?>
|
||||
<input type="password" name="<?= $key ?>" id="reg_<?= $key ?>" required>
|
||||
<?php elseif($key === 'email'): ?>
|
||||
<input type="email" name="<?= $key ?>" id="reg_<?= $key ?>" required>
|
||||
<?php else: ?>
|
||||
<input type="text" name="<?= $key ?>" id="reg_<?= $key ?>" value="<?= htmlspecialchars($validData[$key] ?? '') ?>" required>
|
||||
<?php endif; ?>
|
||||
|
||||
<label for="reg_password">Passwort:</label>
|
||||
<input type="password" name="password" id="reg_password" required>
|
||||
<?php if (!empty($errors[$key])): ?>
|
||||
<div class="error"><?= $errors[$key] ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="do" value="login">
|
||||
<button type="submit" class="btn" style="display: block">Login</button>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user