forked from Github-Mirrors/canaille
feat: more blocks for theming firstlogin, forgotten-password and
reset-password pages
This commit is contained in:
parent
61da0683bd
commit
0cbaa3b3bc
3 changed files with 76 additions and 58 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)) }}
|
||||
|
|
Loading…
Reference in a new issue