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 %}
|
{% block content %}
|
||||||
<div class="loginform">
|
<div class="loginform">
|
||||||
<h3 class="ui top attached header">
|
{% block header %}
|
||||||
{% if logo_url %}
|
<h3 class="ui top attached header">
|
||||||
<img class="ui image" src="{{ logo_url }}">
|
{% if logo_url %}
|
||||||
{% endif %}
|
<img class="ui image" src="{{ logo_url }}">
|
||||||
<div class="content">
|
{% endif %}
|
||||||
{% trans %}First login{% endtrans %}
|
<div class="content">
|
||||||
</div>
|
{% trans %}First login{% endtrans %}
|
||||||
</h3>
|
</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">
|
<div class="ui attached clearing segment">
|
||||||
{% call fui.render_form(form) %}
|
{% call fui.render_form(form) %}
|
||||||
<div class="ui right aligned container">
|
{% block buttons %}
|
||||||
<div class="ui stackable 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>
|
<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>
|
<button type="submit" name="action" value="sendmail" class="ui right floated primary button">{{ _("Send the initialization email") }}</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endblock %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,41 +7,50 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="loginform">
|
<div class="loginform">
|
||||||
<h3 class="ui top attached header">
|
{% block header %}
|
||||||
{% if logo_url %}
|
<h3 class="ui top attached header">
|
||||||
<img class="ui image" src="{{ logo_url }}">
|
{% if logo_url %}
|
||||||
{% endif %}
|
<img class="ui image" src="{{ logo_url }}">
|
||||||
<div class="content">
|
{% endif %}
|
||||||
{% trans %}Forgotten password{% endtrans %}
|
<div class="content">
|
||||||
</div>
|
{% trans %}Forgotten password{% endtrans %}
|
||||||
</h3>
|
</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">
|
<div class="ui attached clearing segment">
|
||||||
{% call fui.render_form(form) %}
|
{% 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">
|
{% block buttons %}
|
||||||
<div class="ui stackable buttons">
|
<div class="ui right aligned container">
|
||||||
{% if features.has_registration %}
|
<div class="ui stackable buttons">
|
||||||
<a type="button" class="ui right floated button" href="{{ url_for('core.account.join') }}">{{ _("Create an account") }}</a>
|
{% if features.has_registration %}
|
||||||
{% endif %}
|
<a type="button" class="ui right floated button" href="{{ url_for('core.account.join') }}">{{ _("Create an account") }}</a>
|
||||||
<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 %}
|
{% 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>
|
||||||
</div>
|
{% endblock %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,14 +3,16 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="loginform">
|
<div class="loginform">
|
||||||
<h3 class="ui top attached header">
|
{% block header %}
|
||||||
{% if logo_url %}
|
<h3 class="ui top attached header">
|
||||||
<img class="ui image" src="{{ logo_url }}">
|
{% if logo_url %}
|
||||||
{% endif %}
|
<img class="ui image" src="{{ logo_url }}">
|
||||||
<div class="content">
|
{% endif %}
|
||||||
{% trans %}Password reset{% endtrans %}
|
<div class="content">
|
||||||
</div>
|
{% trans %}Password reset{% endtrans %}
|
||||||
</h3>
|
</div>
|
||||||
|
</h3>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<div class="ui attached clearing segment">
|
<div class="ui attached clearing segment">
|
||||||
{{ fui.render_form(form, _("Password reset"), action=url_for("core.auth.reset", user=user, hash=hash)) }}
|
{{ fui.render_form(form, _("Password reset"), action=url_for("core.auth.reset", user=user, hash=hash)) }}
|
||||||
|
|
Loading…
Reference in a new issue