annotate sat_templates/templates/default/login/register.html @ 300:2a697b1376f1

bulma (components/block): disco entities's `icon_name` is used as icon when available: otherwide, `default_icon_name` is used.
author Goffi <goffi@goffi.org>
date Sat, 20 Feb 2021 13:37:19 +0100
parents 3dd0b27f740c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
54
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {% extends 'login/login.html' %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
2
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% block title %}{{C.APP_NAME}} register new account{% endblock %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
4
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
5 {% block login_error_message %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
6 {% if login_error == S_C.ALREADY_EXISTS %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {%- trans %}This login already exists, please choose another one.{% endtrans -%}
179
e5116a99eb3d login/register: display message for invalid certificate
Goffi <goffi@goffi.org>
parents: 164
diff changeset
8 {% elif login_error == S_C.INVALID_CERTIFICATE %}
e5116a99eb3d login/register: display message for invalid certificate
Goffi <goffi@goffi.org>
parents: 164
diff changeset
9 {%- trans %}The certificate of the server is invalid. Please contact your server administrator.{% endtrans -%}
54
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
10 {% elif login_error == S_C.INVALID_INPUT %}
185
3dd0b27f740c login: typo
Goffi <goffi@goffi.org>
parents: 179
diff changeset
11 {%- trans %}The data you entered are not valid.{% endtrans -%}
54
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
12 {% elif login_error == S_C.BAD_REQUEST %}
179
e5116a99eb3d login/register: display message for invalid certificate
Goffi <goffi@goffi.org>
parents: 164
diff changeset
13 {%- trans %}Bad request, please contact your service administrator.{% endtrans -%}
54
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
14 {% else %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
15 {%- trans %}An unknown error occurred, please contact your service administrator.{% endtrans -%}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% endif %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
17 {% endblock login_error_message %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
18
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% block login_right_top %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
20 {% if login_url is defined %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <div id="login_link">
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
22 <a href="{{login_url}}">
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
23 {%- trans %}Go to login page{% endtrans -%}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
24 </a>
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
25 </div>
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
26 {% endif %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
27 {% endblock login_right_top %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
28
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
29 {% block login_form %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
30 {% call form.form(class='register') %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
31 {{ field.meta('type', 'register') }}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
32 {{ field.text("login", _("Login"),
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
33 required=true,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
34 pattern=S_C.REG_LOGIN_RE,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
35 title=_("Login must be lower case, with only plain letters (a-z), numbers (0-9) or underscore(_)"),
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
36 value=login,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
37 )}}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
38 {{ field.email("email", _("Email"),
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
39 required=true,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
40 value=email,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
41 )}}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
42 {{ field.password("password", _("Password"),
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
43 required=true,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
44 minlength=S_C.PASSWORD_MIN_LENGTH,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
45 value=password,
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
46 )}}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
47 {{ field.submit(_("Register new account")) }}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
48 {% endcall %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
49 {% endblock login_form %}
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
50
a5dc14675d5e login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff changeset
51 {% block login_right_bottom %}{% endblock %}