learn-go/snippetbox/ui/html/pages/login.tmpl

27 lines
682 B
Cheetah
Raw Normal View History

2024-02-08 00:27:03 +00:00
{{define "title"}}Login{{end}}
{{define "main"}}
2024-02-08 07:04:06 +00:00
<form action='/user/login' method='POST' novalidate>
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
2024-02-08 00:27:03 +00:00
{{range .Form.NonFieldErrors}}
<div class="error">{{.}}</div>
{{end}}
<div>
2024-02-08 17:32:19 +00:00
<label>Email:</label>
2024-02-08 00:27:03 +00:00
{{with .Form.FieldErrors.email}}
<label class='error'>{{.}}</label>
{{end}}
2024-02-08 00:27:03 +00:00
<input type='text' name='email' value='{{.Form.Email}}'>
</div>
<div>
<label>Password:</label>
{{with .Form.FieldErrors.password}}
<label class='error'>{{.}}</label>
{{end}}
2024-02-08 00:27:03 +00:00
<input type='password' name='password'>
</div>
<div>
<input type='submit' value='Login'>
</div>
{{end}}