learn-go/snippetbox/ui/html/pages/login.tmpl
2024-02-07 16:27:03 -08:00

26 lines
609 B
Cheetah

{{define "title"}}Login{{end}}
{{define "main"}}
<form action='/user/login' method='POST'>
{{range .Form.NonFieldErrors}}
<div class="error">{{.}}</div>
{{end}}
<div>
<label>Username:</label>
{{with .Form.FieldErrors.email}}
<label class='error'>{{.}}</label>
{{end}}
<input type='text' name='email' value='{{.Form.Email}}'>
</div>
<div>
<label>Password:</label>
{{with .Form.FieldErrors.password}}
<label class='error'>{{.}}</label>
{{end}}
<input type='password' name='password'>
</div>
<div>
<input type='submit' value='Login'>
</div>
{{end}}