comparison default/login/login.html @ 54:a5dc14675d5e

login: login, logged and registration pages
author Goffi <goffi@goffi.org>
date Fri, 27 Oct 2017 18:56:21 +0200
parents
children
comparison
equal deleted inserted replaced
53:dfef430a26ef 54:a5dc14675d5e
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
2 {% import 'input/form.html' as form with context %}
3 {% import 'input/field.html' as field with context %}
4
5 {% block title %}{{C.APP_NAME}} login{% endblock %}
6
7 {% block body %}
8 <div id="login_container">
9 <div id="login_box">
10 <div id="login_left">
11 <img src="{{media_path}}libervia/register_left.png">
12 </div>
13 <div id="login_right">
14 {% block login_right_top %}{% endblock %}
15 {% if login_error is defined %}
16 {# error messages displayed in case of failing attempt to login #}
17 <div id="login_error">
18 <p>
19 {% block login_error_message %}
20 {% if login_error == S_C.PROFILE_AUTH_ERROR %}
21 {%- trans %}Your login and/or password is incorrect. Please try again.{% endtrans -%}
22 {% elif login_error == S_C.XMPP_AUTH_ERROR %}
23 {%- trans %}Your XMPP account failed to connect. Did you enter the good password? If you have changed your XMPP password since your last connection on Libervia, please use another SàT frontend to update your profile.{% endtrans -%}
24 {% elif login_error == S_C.NO_REPLY %}
25 {%- trans %}Did not received a reply (the timeout expired or the connection is broken).{% endtrans -%}
26 {% else %}
27 {%- trans %}An unknown error occurred, please contact your service administrator.{% endtrans -%}
28 {% endif %}
29 {% endblock login_error_message %}
30 </p>
31 </div>
32 {% endif %}
33
34 <div id="login_form">
35 {% block login_form %}
36 {% call form.form() %}
37 {{ field.meta('type', 'login') }}
38 {{ field.text("login", _("Login"),
39 required=true,
40 value=login,
41 )}}
42 {{ field.password("password", _("Password"), required=not empty_password_allowed) }}
43 {{ field.submit(_("Log in")) }}
44 {% endcall %}
45 {% endblock login_form %}
46 </div>
47 {% block login_right_bottom %}
48 {% if register_url is defined %}
49 <div id="create_account_link">
50 <p>
51 <a href="{{register_url}}">{% trans %}No account yet? Create a new one!{% endtrans %}</a>
52 </p>
53 </div>
54 {% endif %}
55 {% endblock login_right_bottom %}
56 </div>
57 </div>
58 </div>
59 {% endblock body %}