Mercurial > libervia-templates
annotate sat_templates/default/login/register.html @ 147:33c7ce833d3f
install: setup.py fix + moved "default" dir in a "sat_templates" dir:
the merge request at https://bugs.goffi.org/mr/view/3 was a good basis, but not fully working ("default" dir was removed), this patch fixes it, and do some improvments:
- moved "default" in "sat_templates" dir, which correspond to the python module, so it can be found easily from python
- added VERSION, and mercurial hash detection, in the same way as for Cagou and backend
- slight modification of classifiers
- replaces tabs coming from MR by spaces
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 02 Jun 2018 17:25:43 +0200 |
parents | default/login/register.html@a5dc14675d5e |
children |
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 -%} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 {% elif login_error == S_C.INVALID_INPUT %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 {%- trans %}The data you entered are nod valid.{% endtrans -%} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 {% elif login_error == S_C.BAD_REQUEST %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 {%- trans %}Bad request, please contact your service administrator{% endtrans -%} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 {% else %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 {%- 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
|
14 {% endif %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 {% endblock login_error_message %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 {% block login_right_top %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 {% if login_url is defined %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 <div id="login_link"> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 <a href="{{login_url}}"> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 {%- trans %}Go to login page{% endtrans -%} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 </a> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
23 </div> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 {% endif %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 {% endblock login_right_top %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
27 {% block login_form %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
28 {% call form.form(class='register') %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
29 {{ field.meta('type', 'register') }} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 {{ field.text("login", _("Login"), |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
31 required=true, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
32 pattern=S_C.REG_LOGIN_RE, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
33 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
|
34 value=login, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
35 )}} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
36 {{ field.email("email", _("Email"), |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
37 required=true, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
38 value=email, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
39 )}} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
40 {{ field.password("password", _("Password"), |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
41 required=true, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
42 minlength=S_C.PASSWORD_MIN_LENGTH, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 value=password, |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
44 )}} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
45 {{ field.submit(_("Register new account")) }} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 {% endcall %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 {% endblock login_form %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
48 |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 {% block login_right_bottom %}{% endblock %} |