Auth logic is completed (signin, signup, logout), Added: Middlewares, RequireAuth middleware
This commit is contained in:
@ -1,9 +1,21 @@
|
||||
<section class="signin">
|
||||
<form>
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" id="username">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password">
|
||||
<input type="submit" value="Sign In" id="submit-signin">
|
||||
</form>
|
||||
<?php if ($this->get('error')): ?>
|
||||
<div class="error"><?= $this->get('error') ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="/auth/signin" method="POST">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" name="email" id="email" value="<?= htmlspecialchars($_POST['email'] ?? '') ?>" required>
|
||||
<?php if (isset($this->get('validationErrors')['email'])): ?>
|
||||
<small class="error"><?= $this->get('validationErrors')['email'] ?></small>
|
||||
<?php endif; ?>
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password" required>
|
||||
<?php if (isset($this->get('validationErrors')['password'])): ?>
|
||||
<small class="error"><?= $this->get('validationErrors')['password'] ?></small>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="submit" value="Sign In">
|
||||
</form>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user