06/15 Phase 1 + 2 codes
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{% macro field(f) %}
|
||||
<div class="field">
|
||||
{{ f.label }}
|
||||
{{ f(class="input") }}
|
||||
{% if f.errors %}
|
||||
<ul class="errors">
|
||||
{% for e in f.errors %}<li>{{ e }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro turnstile_widget(enabled) %}
|
||||
{% if enabled and TURNSTILE_SITE_KEY %}
|
||||
<div class="cf-turnstile" data-sitekey="{{ TURNSTILE_SITE_KEY }}"></div>
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "auth/_macros.html" import field %}
|
||||
{% block title %}{{ _('Sign in') }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card narrow">
|
||||
<h2>{{ _('Sign in') }}</h2>
|
||||
<form method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
{{ field(form.email) }}
|
||||
{{ field(form.password) }}
|
||||
<label class="check">{{ form.remember() }} {{ form.remember.label.text }}</label>
|
||||
{{ form.submit(class="btn") }}
|
||||
</form>
|
||||
<p class="muted">
|
||||
<a href="{{ url_for('auth.reset_request') }}">{{ _('Forgot password?') }}</a> ·
|
||||
<a href="{{ url_for('auth.register') }}">{{ _('Create account') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "auth/_macros.html" import field, turnstile_widget %}
|
||||
{% block title %}{{ _('Register') }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card narrow">
|
||||
<h2>{{ _('Create account') }}</h2>
|
||||
<form method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
{{ field(form.display_name) }}
|
||||
{{ field(form.email) }}
|
||||
{{ field(form.password) }}
|
||||
{{ field(form.confirm) }}
|
||||
{{ turnstile_widget(turnstile) }}
|
||||
{{ form.submit(class="btn") }}
|
||||
</form>
|
||||
<p class="muted"><a href="{{ url_for('auth.login') }}">{{ _('Already have an account? Sign in') }}</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "auth/_macros.html" import field %}
|
||||
{% block title %}{{ _('Set new password') }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card narrow">
|
||||
<h2>{{ _('Set new password') }}</h2>
|
||||
<form method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
{{ field(form.password) }}
|
||||
{{ field(form.confirm) }}
|
||||
{{ form.submit(class="btn") }}
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "auth/_macros.html" import field %}
|
||||
{% block title %}{{ _('Reset password') }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card narrow">
|
||||
<h2>{{ _('Reset password') }}</h2>
|
||||
<form method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
{{ field(form.email) }}
|
||||
{{ form.submit(class="btn") }}
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user