| 1 |
{% extends "security/base.html" %} |
| 2 |
{% set title = title|default(_fsdomain('Login')) %} |
| 3 |
{% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors, render_form_errors, prop_next %} |
| 4 |
|
| 5 |
{% block content %} |
| 6 |
{% include "security/_messages.html" %} |
| 7 |
<h1>{{ _fsdomain('Login') }}</h1> |
| 8 |
<form action="{{ url_for_security('login') }}{{ prop_next() }}" method="post" name="login_user_form"> |
| 9 |
{{ login_user_form.hidden_tag() }} |
| 10 |
{{ render_form_errors(login_user_form) }} |
| 11 |
{% if login_user_form.email and "email" in identity_attributes %} |
| 12 |
{{ render_field_with_errors(login_user_form.email) }}{% endif %} |
| 13 |
{% if login_user_form.username and "username" in identity_attributes %} |
| 14 |
{% if login_user_form.email and "email" in identity_attributes %}<h3>{{ _fsdomain("or") }}</h3>{% endif %} |
| 15 |
{{ render_field_with_errors(login_user_form.username) }} |
| 16 |
{% endif %} |
| 17 |
<div class="fs-gap">{{ render_field_with_errors(login_user_form.password) }}</div> |
| 18 |
{{ render_field_with_errors(login_user_form.remember) }} |
| 19 |
{{ render_field_errors(login_user_form.csrf_token) }} |
| 20 |
{{ render_field(login_user_form.submit) }} |
| 21 |
</form> |
| 22 |
{% if security.webauthn %} |
| 23 |
<hr class="fs-gap"> |
| 24 |
<h2>{{ _fsdomain("Use a Passkey to Sign In") }}</h2> |
| 25 |
<div> |
| 26 |
<form method="get" id="wan_signin_form" name="wan_signin_form"> |
| 27 |
<input id="wan_signin" name="wan_signin" type="submit" value="{{ _fsdomain('Sign in with a passkey') }}" formaction="{{ url_for_security('wan_signin') }}{{ prop_next() }}"> |
| 28 |
</form> |
| 29 |
</div> |
| 30 |
{% endif %} |
| 31 |
{% if security.oauthglue %} |
| 32 |
<hr class="fs-gap"> |
| 33 |
<h2>{{ _fsdomain("Use Social Login to Sign In") }}</h2> |
| 34 |
{% for provider in security.oauthglue.provider_names %} |
| 35 |
<div class="fs-gap"> |
| 36 |
<form method="post" id="{{ provider }}_form" name="{{ provider }}_form"> |
| 37 |
<input id="{{ provider }}" name="{{ provider }}" type="submit" value="{{ _fsdomain('Continue with %(provider)s', provider=provider) }}" formaction="{{ url_for_security('oauthstart', name=provider) }}{{ prop_next() }}"> |
| 38 |
{% if csrf_token is defined %} |
| 39 |
<input id="{{ provider }}_csrf_token" name="{{ provider }}_csrf_token" type="hidden" value="{{ csrf_token() }}"> |
| 40 |
{% endif %} |
| 41 |
</form> |
| 42 |
</div> |
| 43 |
{% endfor %} |
| 44 |
{% endif %} |
| 45 |
{% include "security/_menu.html" %} |
| 46 |
{% endblock content %} |