feat: more blocks for theming firstlogin, forgotten-password and

reset-password pages
This commit is contained in:
Éloi Rivard 2024-05-21 18:08:44 +02:00
parent 61da0683bd
commit 0cbaa3b3bc
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
3 changed files with 76 additions and 58 deletions

View file

@ -3,32 +3,39 @@
{% block content %}
<div class="loginform">
<h3 class="ui top attached header">
{% if logo_url %}
<img class="ui image" src="{{ logo_url }}">
{% endif %}
<div class="content">
{% trans %}First login{% endtrans %}
</div>
</h3>
{% block header %}
<h3 class="ui top attached header">
{% if logo_url %}
<img class="ui image" src="{{ logo_url }}">
{% endif %}
<div class="content">
{% trans %}First login{% endtrans %}
</div>
</h3>
{% endblock %}
{% block message %}
<div class="ui attached message">
{% trans %}
It seems this is the first time you are logging here. In order to finalize your
account configuration, you need to set a password to your account. We will send
you an email containing a link that will allow you to set a password. Please click
on the "Send the initialization email" button below to send the email.
{% endtrans %}
</div>
{% endblock %}
<div class="ui attached message">
{% trans %}
It seems this is the first time you are logging here. In order to finalize your
account configuration, you need to set a password to your account. We will send
you an email containing a link that will allow you to set a password. Please click
on the "Send the initialization email" button below to send the email.
{% endtrans %}
</div>
<div class="ui attached clearing segment">
{% call fui.render_form(form) %}
<div class="ui right aligned container">
<div class="ui stackable buttons">
{% block buttons %}
<div class="ui right aligned container">
<div class="ui stackable buttons">
<a type="button" class="ui right floated button" href="{{ url_for('core.auth.login') }}">{{ _("Login page") }}</a>
<button type="submit" name="action" value="sendmail" class="ui right floated primary button">{{ _("Send the initialization email") }}</button>
<a type="button" class="ui right floated button" href="{{ url_for('core.auth.login') }}">{{ _("Login page") }}</a>
<button type="submit" name="action" value="sendmail" class="ui right floated primary button">{{ _("Send the initialization email") }}</button>
</div>
</div>
</div>
{% endblock %}
{% endcall %}
</div>
</div>

View file

@ -7,41 +7,50 @@
{% block content %}
<div class="loginform">
<h3 class="ui top attached header">
{% if logo_url %}
<img class="ui image" src="{{ logo_url }}">
{% endif %}
<div class="content">
{% trans %}Forgotten password{% endtrans %}
</div>
</h3>
{% block header %}
<h3 class="ui top attached header">
{% if logo_url %}
<img class="ui image" src="{{ logo_url }}">
{% endif %}
<div class="content">
{% trans %}Forgotten password{% endtrans %}
</div>
</h3>
{% endblock %}
{% block message %}
<div class="ui attached message">
{% trans %}
After this form is sent, if the email address or the login you provided
exists, you will receive an email containing a link that will allow you
to reset your password.
{% endtrans %}
</div>
{% endblock %}
<div class="ui attached message">
{% trans %}
After this form is sent, if the email address or the login you provided
exists, you will receive an email containing a link that will allow you
to reset your password.
{% endtrans %}
</div>
<div class="ui attached clearing segment">
{% call fui.render_form(form) %}
{{ fui.render_field(form.login, icon="user") }}
{% block fields %}
{{ fui.render_field(form.login, icon="user") }}
{% endblock %}
<div class="ui right aligned container">
<div class="ui stackable buttons">
{% if features.has_registration %}
<a type="button" class="ui right floated button" href="{{ url_for('core.account.join') }}">{{ _("Create an account") }}</a>
{% endif %}
<a type="button" class="ui right floated button" href="{{ url_for('core.auth.login') }}">{{ _("Login page") }}</a>
<button type="submit" class="ui right floated {% if request.method != "POST" or form.errors %}primary {% endif %}button">
{% if request.method == "POST" %}
{{ _("Send again") }}
{% else %}
{{ _("Send") }}
{% block buttons %}
<div class="ui right aligned container">
<div class="ui stackable buttons">
{% if features.has_registration %}
<a type="button" class="ui right floated button" href="{{ url_for('core.account.join') }}">{{ _("Create an account") }}</a>
{% endif %}
</button>
<a type="button" class="ui right floated button" href="{{ url_for('core.auth.login') }}">{{ _("Login page") }}</a>
<button type="submit" class="ui right floated {% if request.method != "POST" or form.errors %}primary {% endif %}button">
{% if request.method == "POST" %}
{{ _("Send again") }}
{% else %}
{{ _("Send") }}
{% endif %}
</button>
</div>
</div>
</div>
{% endblock %}
{% endcall %}
</div>
</div>

View file

@ -3,14 +3,16 @@
{% block content %}
<div class="loginform">
<h3 class="ui top attached header">
{% if logo_url %}
<img class="ui image" src="{{ logo_url }}">
{% endif %}
<div class="content">
{% trans %}Password reset{% endtrans %}
</div>
</h3>
{% block header %}
<h3 class="ui top attached header">
{% if logo_url %}
<img class="ui image" src="{{ logo_url }}">
{% endif %}
<div class="content">
{% trans %}Password reset{% endtrans %}
</div>
</h3>
{% endblock %}
<div class="ui attached clearing segment">
{{ fui.render_form(form, _("Password reset"), action=url_for("core.auth.reset", user=user, hash=hash)) }}