NexusDash-izebra/app/templates/flask_user/login_or_register.html

72 lines
2.1 KiB
HTML
Raw Normal View History

2022-01-16 18:22:00 +00:00
{% extends 'flask_user/_public_base.html' %}
{% block title %}
Login or Register
{% endblock %}
{% block content %}
{% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %}
<div class="row">
<div class="col-sm-6">
<h1>{%trans%}Sign in{%endtrans%}</h1>
{# ** Login form ** #}
<form action="{{ url_for('user.login') }}" method="POST" class="form" role="form">
{{ login_form.hidden_tag() }}
{# Username or Email #}
{% set field = login_form.username if user_manager.USER_ENABLE_USERNAME else login_form.email %}
{{ render_field(field, tabindex=110) }}
{# Password #}
{{ render_field(login_form.password, tabindex=120) }}
{# Remember me #}
{% if user_manager.USER_ENABLE_REMEMBER_ME %}
{{ render_checkbox_field(login_form.remember_me, tabindex=130) }}
{% endif %}
{# Submit button #}
{{ render_submit_field(login_form.submit, tabindex=180) }}
</form>
{% if user_manager.USER_ENABLE_FORGOT_PASSWORD %}
<p>
<br/>
<a href="{{ url_for('user.forgot_password') }}" tabindex='190'>
{%trans%}Forgot your Password?{%endtrans%}</a>
</p>
{% endif %}
</div>
<div class="col-sm-6">
<h1>{%trans%}Register{%endtrans%}</h1>
{# ** Register form ** #}
<form action="{{ url_for('user.register') }}" method="POST" novalidate formnovalidate class="form" role="form">
{{ register_form.hidden_tag() }}
{# Username or Email #}
{% set field = register_form.username if user_manager.USER_ENABLE_USERNAME else register_form.email %}
{{ render_field(field, tabindex=210) }}
{% if user_manager.USER_ENABLE_EMAIL and user_manager.USER_ENABLE_USERNAME %}
{{ render_field(register_form.email, tabindex=220) }}
{% endif %}
{{ render_field(register_form.password, tabindex=230) }}
{% if user_manager.USER_REQUIRE_RETYPE_PASSWORD %}
{{ render_field(register_form.retype_password, tabindex=240) }}
{% endif %}
{{ render_submit_field(register_form.submit, tabindex=280) }}
</form>
</div>
</div>
{% endblock %}