38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
|
{{/*###
|
||
|
Handler=/login
|
||
|
TitleBar=Log in
|
||
|
KyutGrill=login2.jpg
|
||
|
*/}}
|
||
|
{{ define "tpl" }}
|
||
|
<div class="ui container">
|
||
|
{{/* Not logged in block */}}
|
||
|
{{ if .Context.User.Username }}
|
||
|
<div class="ui segment">
|
||
|
{{ .T "You're already logged in!" }}
|
||
|
</div>
|
||
|
{{ else }}
|
||
|
<div class="tiny container">
|
||
|
<div class="ui raised segments">
|
||
|
<div class="ui segment">
|
||
|
<form id="login-form" class="ui form" method="post" action="/login">
|
||
|
<div class="field">
|
||
|
<label>{{ .T "Username (or email)" }}</label>
|
||
|
<input tabindex="1" type="text" name="username" placeholder="{{ .T "Username" }}" value="{{ .FormData.username }}" required>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<label>{{ .T "Password" }} <a href="/pwreset">{{ .T "(forgot?)" }}</a></label>
|
||
|
<input tabindex="2" type="password" name="password" placeholder="{{ .T "Password" }}" value="{{ .FormData.password }}" required>
|
||
|
</div>
|
||
|
<input type="hidden" name="redir" value="{{ or (.Gin.Query "redir") .FormData.redir }}">
|
||
|
{{ ieForm .Gin }}
|
||
|
</form>
|
||
|
</div>
|
||
|
<div class="ui right aligned segment">
|
||
|
<button tabindex="3" class="ui primary button" type="submit" form="login-form">{{ .T "Submit" }}</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
{{ end }}
|