2018-03-18 18:43:30 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Sign in
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2018-12-22 14:14:08 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="card">
|
|
|
|
{% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %}
|
|
|
|
<h2 class="card-header">{%trans%}Sign in{%endtrans%}</h2>
|
2018-03-18 18:43:30 +01:00
|
|
|
|
2018-12-22 14:14:08 +01:00
|
|
|
<form action="" method="POST" class="form card-body" role="form">
|
|
|
|
{{ form.hidden_tag() }}
|
2018-03-18 18:43:30 +01:00
|
|
|
|
2018-12-22 14:14:08 +01:00
|
|
|
{# Username or Email field #}
|
2020-01-19 20:48:41 +01:00
|
|
|
{% set field = form.username if user_manager.USER_ENABLE_USERNAME else form.email %}
|
2018-12-22 14:14:08 +01:00
|
|
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
|
|
|
{# Label on left, "New here? Register." on right #}
|
|
|
|
<label for="{{ field.id }}" class="control-label">{{ field.label.text }}</label>
|
|
|
|
{{ field(class_='form-control', tabindex=110) }}
|
|
|
|
{% if field.errors %}
|
|
|
|
{% for e in field.errors %}
|
|
|
|
<p class="help-block">{{ e }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2018-03-18 18:43:30 +01:00
|
|
|
</div>
|
|
|
|
|
2018-12-22 14:14:08 +01:00
|
|
|
{# Password field #}
|
|
|
|
{% set field = form.password %}
|
|
|
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
2018-06-04 19:49:42 +02:00
|
|
|
<label for="{{ field.id }}" class="control-label">{{ field.label.text }}
|
2020-01-19 16:03:38 +01:00
|
|
|
{% if user_manager.USER_ENABLE_FORGOT_PASSWORD %}
|
2018-03-18 18:43:30 +01:00
|
|
|
<a href="{{ url_for('user.forgot_password') }}" tabindex='195'>
|
2018-06-04 19:49:42 +02:00
|
|
|
[{%trans%}Forgot My Password{%endtrans%}]</a>
|
|
|
|
{% endif %}
|
|
|
|
</label>
|
2018-12-22 14:14:08 +01:00
|
|
|
{{ field(class_='form-control', tabindex=120) }}
|
|
|
|
{% if field.errors %}
|
|
|
|
{% for e in field.errors %}
|
|
|
|
<p class="help-block">{{ e }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2018-03-18 18:43:30 +01:00
|
|
|
</div>
|
|
|
|
|
2018-12-22 14:14:08 +01:00
|
|
|
{# Remember me #}
|
2020-01-19 16:03:38 +01:00
|
|
|
{% if user_manager.USER_ENABLE_REMEMBER_ME %}
|
2018-12-22 14:14:08 +01:00
|
|
|
{{ render_checkbox_field(login_form.remember_me, tabindex=130) }}
|
|
|
|
{% endif %}
|
2018-05-14 00:31:42 +02:00
|
|
|
|
2018-12-22 14:14:08 +01:00
|
|
|
{# Submit button #}
|
|
|
|
<p>
|
|
|
|
{{ render_submit_field(form.submit, tabindex=180) }}
|
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
</div>
|
2018-06-04 19:49:42 +02:00
|
|
|
|
2018-12-22 14:14:08 +01:00
|
|
|
<div class="card mt-4">
|
|
|
|
{% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %}
|
|
|
|
<h2 class="card-header">{%trans%}Sign in with Github{%endtrans%}</h2>
|
|
|
|
<div class="card-body">
|
2020-01-24 19:15:09 +01:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('github.start') }}">GitHub</a>
|
2018-12-22 14:14:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-18 18:43:30 +01:00
|
|
|
</div>
|
|
|
|
|
2018-12-22 14:14:08 +01:00
|
|
|
<aside class="col-sm-4">
|
|
|
|
<div class="card">
|
|
|
|
{% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %}
|
|
|
|
<h2 class="card-header">{%trans%}New here?{%endtrans%}</h2>
|
|
|
|
<div class="card-body">
|
2018-05-29 19:16:05 +02:00
|
|
|
<p>Create an account using your forum account or email.</p>
|
2018-03-18 19:05:53 +01:00
|
|
|
|
2019-11-16 00:51:42 +01:00
|
|
|
<a href="{{ url_for('users.claim') }}" class="btn btn-primary">{%trans%}Claim your account{%endtrans%}</a>
|
2018-05-18 22:35:54 +02:00
|
|
|
</div>
|
2018-12-22 14:14:08 +01:00
|
|
|
</div>
|
|
|
|
</aside>
|
2018-03-18 18:43:30 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|