tfstated/pkg/webui/html/login.html

31 lines
1.2 KiB
HTML

{{ define "main" }}
<div style="display: grid;">
<form action="/login" method="post" style="align-self:center; justify-self: center;">
<fieldset style="align-items:center; display:flex; flex-direction:column; gap:8px;">
<legend>Login</legend>
<div style="align-items:center; display:flex; flex-direction:row; gap:8px;">
<label for="username">Username</label>
<input autofocus
{{ if .Forbidden }}class="error"{{ end }}
id="username"
name="username"
type="text"
value="{{ .Username }}"
required>
</div>
<div style="align-items:center; display:flex; flex-direction:row; gap:8px;">
<label for="password">Password</label>
<input {{ if .Forbidden }}class="error"{{ end }}
id="password"
name="password"
type="password"
required>
</div>
{{ if .Forbidden }}<span class="error">Invalid username or password</span>{{ end }}
<div style="align-self:stretch; display:flex; justify-content:flex-end;">
<button class="primary" type="submit" value="login">Login</button>
</div>
</fieldset>
</form>
</div>
{{ end }}