39 lines
1.7 KiB
Cheetah
39 lines
1.7 KiB
Cheetah
{{define "head"}}<title>Log in — {{.SiteName}}</title>
|
|
<meta name="description" content="Log in to {{.SiteName}}.">
|
|
<meta itemprop="description" content="Log in to {{.SiteName}}.">
|
|
<style>input{margin-bottom:0.5em;}</style>
|
|
{{end}}
|
|
{{define "content"}}
|
|
<div class="tight content-container">
|
|
<h1>Log in to {{.SiteName}}</h1>
|
|
|
|
{{if .Flashes}}<ul class="errors">
|
|
{{range .Flashes}}<li class="urgent">{{.}}</li>{{end}}
|
|
</ul>{{end}}
|
|
|
|
<form action="/oauth/signup" method="post" style="text-align: center;margin-top:1em;" onsubmit="disableSubmit()">
|
|
<input type="hidden" name="access_token" value="{{ .AccessToken }}" />
|
|
<input type="hidden" name="token_username" value="{{ .TokenUsername }}" />
|
|
<input type="hidden" name="token_alias" value="{{ .TokenAlias }}" />
|
|
<input type="hidden" name="token_email" value="{{ .TokenEmail }}" />
|
|
<input type="hidden" name="token_remote_user" value="{{ .TokenRemoteUser }}" />
|
|
<input type="hidden" name="provider" value="{{ .Provider }}" />
|
|
<input type="hidden" name="client_id" value="{{ .ClientID }}" />
|
|
<input type="hidden" name="signature" value="{{ .TokenHash }}" />
|
|
|
|
<input type="text" name="username" placeholder="Username" value="{{.Username}}" /><br />
|
|
<input type="text" name="alias" placeholder="Alias"{{ if .Alias }} value="{{.Alias}}"{{ end }} /><br />
|
|
<input type="text" name="email" placeholder="Email"{{ if .Email }} value="{{.Email}}"{{ end }} /><br />
|
|
<input type="password" name="password" placeholder="Password" /><br />
|
|
<input type="submit" id="btn-login" value="Login" />
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
function disableSubmit() {
|
|
var $btn = document.getElementById("btn-login");
|
|
$btn.value = "Logging in...";
|
|
$btn.disabled = true;
|
|
}
|
|
</script>
|
|
{{end}}
|