aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html/login.html
blob: 906458ac1ea67579c3bf7527dd5a3f8a1d5af079 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{{ define "title"}}{{ t "Sign In" }}{{ end }}

{{ define "content"}}
<section class="login-form">
    <form action="{{ route "checkLogin" }}" method="post">
        <input type="hidden" name="csrf" value="{{ .csrf }}">

        {{ if .errorMessage }}
            <div class="alert alert-error">{{ t .errorMessage }}</div>
        {{ end }}

        <label for="form-username">{{ t "Username" }}</label>
        <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus>

        <label for="form-password">{{ t "Password" }}</label>
        <input type="password" name="password" id="form-password" value="{{ .form.Password }}" required>

        <div class="buttons">
            <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Sign in" }}</button>
        </div>
    </form>
    {{ if hasOAuth2Provider "google" }}
    <div class="oauth2">
        <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Sign in with Google" }}</a>
    </div>
    {{ end }}
</section>
{{ end }}