dex/static/html/register.html
2015-08-25 09:42:43 -07:00

47 lines
1.4 KiB
HTML

{{ template "header.html" }}
<div class="panel">
<h2 class="heading">Create Your Account</h2>
{{ if .Error }}
<div class="error-box">{{ .Message }}</div>
{{ else }}
<form id="registerForm" method="POST" action="/register">
<div class="form-row">
<div class="input-desc">
<label for="email">Email Address</label>
</div>
<input id="email" class="input-box" type="text" name="email" required placeholder="email" value="{{.Email}}" autofocus />
{{ range $fe := .FormErrors }}
{{ if eq $fe.Field "email" }}
<div class="error-box-field">{{ $fe.Error }}</div>
{{ end }}
{{ end }}
</div>
{{ if .Local }}
<div class="form-row">
<div class="input-desc">
<label for="password">Password</label>
</div>
<input minlength="6" required id="password" name="password" type="password" class="input-box" value="{{.Password}}"/>
{{ range $fe := .FormErrors }}
{{ if eq $fe.Field "password" }}
<div class="error-box-field">{{ $fe.Error }}</div>
{{ end }}
{{ end }}
</div>
{{ end }}
<button type="submit" class="btn btn-primary">Create Account</button>
<input type="hidden" name="code" value="{{.Code}}"/>
<input type="hidden" name="validate" value="1"/>
</form>
{{ end }}
</div>
{{ template "footer.html" }}