auth-ui: rewrite ui
Change-Id: I6f00867015ec77aa7e336e89da4dc1b081e330c6
diff --git a/core/auth/ui/templates/login.html b/core/auth/ui/templates/login.html
index 0d961b5..a79b400 100644
--- a/core/auth/ui/templates/login.html
+++ b/core/auth/ui/templates/login.html
@@ -1,29 +1,27 @@
{{ define "title" }}dodo: sign in{{ end }}
{{ define "main" }}
-<div>
- <div class="logo">
+<div class="terminal">
+ <div class="logo" aria-hidden="true">
<span>do</span><span>do:</span>
</div>
- <form action="" method="POST">
- <label>
- username
- <input type="text" name="username" autofocus required />
- </label>
- <label>
- password
- <input type="password" name="password" required />
- </label>
- <input type="hidden" name="csrf_token" value="{{ .csrfToken }}" />
- <button class="subbmit-button" type="submit">login</button>
+ <h1>Sign in</h1>
+ <form id="login-form" action="{{ .FormAction }}" method="POST">
+ {{ if .GeneralNotice }}
+ <div role="alert">
+ <p>{{ .GeneralNotice }}</p>
+ </div>
+ {{ end }}
+ <label for="login-username">Username</label>
+ <input id="login-username" type="text" name="username" autocomplete="username" autocapitalize="none" spellcheck="false" required />
+ <label for="login-password">Password</label>
+ <input id="login-password" type="password" name="password" autocomplete="current-password" required />
+ <input id="login-csrf-token" type="hidden" name="csrf_token" value="{{ .CSRFToken }}" />
+ <button id="login-submit" class="subbmit-button" type="submit">Sign in</button>
</form>
- {{- if .enableRegistration -}}
- <nav>
- <ul>
- <li>
- <a href="/register">Create Account</a>
- </li>
- </ul>
+ {{- if .EnableRegistration }}
+ <nav aria-label="Registration">
+ <a href="/register">Create account</a>
</nav>
+ {{- end }}
</div>
-{{- end -}}
{{ end }}