mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-15 03:55:06 +08:00
42 lines
No EOL
1.3 KiB
HTML
42 lines
No EOL
1.3 KiB
HTML
{{ define "admin-login" }}
|
|
{{ template "header" .}}
|
|
|
|
<section class="login">
|
|
<h2>{{ .L.T "users.login"}}</h2>
|
|
{{ if .Data.PasswordEnabled }}
|
|
<form method="post" action="" class="form">
|
|
<div>
|
|
<input type="hidden" name="nonce" value="{{ .Data.Nonce }}" />
|
|
<input type="hidden" name="next" value="{{ .Data.NextURI }}" />
|
|
<p>
|
|
<label for="username">{{ .L.T "users.username" }}</label>
|
|
<input id="username" type="text" name="username" autofocus required minlength="3" />
|
|
</p>
|
|
<p>
|
|
<label for="password">{{ .L.T "users.password" }}</label>
|
|
<input id="password" type="password" name="password" required minlength="8" />
|
|
</p>
|
|
|
|
{{ if .Data.Error }}<p><span class="error">{{ .Data.Error }}</span></p>{{ end }}
|
|
|
|
<p class="submit"><button class="button" type="submit">{{ .L.T "users.login" }}</button></p>
|
|
</div>
|
|
</form>
|
|
{{ end }}
|
|
|
|
{{ if .Data.OIDCProvider }}
|
|
<form method="post" action="/oidc/login">
|
|
<div>
|
|
<input type="hidden" name="nonce" value="{{ .Data.Nonce }}" />
|
|
<p><button class="button button-outline" type="submit">
|
|
<img src="{{ .RootURL }}/public/static/auth/{{ .Data.OIDCProviderLogo }}" alt="" />
|
|
{{ .L.Ts "users.loginOIDC" "name" .Data.OIDCProvider }}
|
|
</button></p>
|
|
</div>
|
|
</form>
|
|
{{ end }}
|
|
|
|
</section>
|
|
|
|
{{ template "footer" .}}
|
|
{{ end }} |