230
|
1 {% extends 'login/login.html' %} |
|
2 |
|
3 {% block title %}{{C.APP_NAME}} register new account{% endblock %} |
|
4 |
|
5 {% block login_error_message %} |
|
6 {% if login_error == S_C.ALREADY_EXISTS %} |
|
7 {%- trans %}This login already exists, please choose another one.{% endtrans -%} |
|
8 {% elif login_error == S_C.INVALID_CERTIFICATE %} |
|
9 {%- trans %}The certificate of the server is invalid. Please contact your server administrator.{% endtrans -%} |
|
10 {% elif login_error == S_C.INVALID_INPUT %} |
|
11 {%- trans %}The data you entered are not valid.{% endtrans -%} |
|
12 {% elif login_error == S_C.BAD_REQUEST %} |
|
13 {%- trans %}Bad request, please contact your service administrator.{% endtrans -%} |
|
14 {% else %} |
|
15 {%- trans %}An unknown error occurred, please contact your service administrator.{% endtrans -%} |
|
16 {% endif %} |
|
17 {% endblock login_error_message %} |
|
18 |
|
19 {% block login_right_top %} |
|
20 {% if login_url is defined %} |
|
21 <div id="login_link"> |
|
22 <a href="{{login_url}}"> |
|
23 {%- trans %}Go to login page{% endtrans -%} |
|
24 </a> |
|
25 </div> |
|
26 {% endif %} |
|
27 {% endblock login_right_top %} |
|
28 |
|
29 {% block login_form %} |
|
30 {% call form.form(class='register') %} |
|
31 {{ field.meta('type', 'register') }} |
|
32 {{ field.text("login", _("Login"), |
|
33 required=true, |
|
34 pattern=S_C.REG_LOGIN_RE, |
|
35 title=_("Login must be lower case, with only plain letters (a-z), numbers (0-9) or underscore(_)"), |
|
36 value=login, |
|
37 icon_left="person", |
|
38 )}} |
|
39 {{ field.email("email", _("Email"), |
|
40 required=true, |
|
41 value=email, |
|
42 icon_left="mail-filled", |
|
43 )}} |
|
44 {{ field.password("password", _("Password"), |
|
45 required=true, |
|
46 minlength=S_C.PASSWORD_MIN_LENGTH, |
|
47 value=password, |
|
48 icon_left="key", |
|
49 )}} |
|
50 {{ field.submit(_("Register new account")) }} |
|
51 {% endcall %} |
|
52 {% endblock login_form %} |
|
53 |
|
54 {% block login_right_bottom %}{% endblock %} |