Creating handler to log in

This commit is contained in:
2024-07-19 10:02:58 +02:00
parent d32fd432d2
commit a6dca00199
3 changed files with 41 additions and 4 deletions

View File

@ -4,7 +4,8 @@
<div class="row">
<div class="col">
<h1>Login</h1>
<form>
<form method="post" action="/user/login">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div class="form-group mt-5">
<label for="email">Email:</label>
{{with .Form.Errors.Get "email"}}
@ -21,10 +22,10 @@
<input type="text" name="password" id="password" class="form-control {{with .Form.Errors.Get "password"}} is-invalid {{end}}"
value="" required autocomplete="off">
</div>
</form>
<hr>
<hr>
<input type="submit" class="btn btn-primary" value="Submit">
<input type="submit" class="btn btn-primary" value="Submit">
</form>
</div>
</div>
</div>