Mercurial > libervia-templates
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sat_templates/default/login/register.html Sat Jun 02 17:25:43 2018 +0200 @@ -0,0 +1,49 @@ +{% extends 'login/login.html' %} + +{% block title %}{{C.APP_NAME}} register new account{% endblock %} + +{% block login_error_message %} +{% if login_error == S_C.ALREADY_EXISTS %} + {%- trans %}This login already exists, please choose another one.{% endtrans -%} +{% elif login_error == S_C.INVALID_INPUT %} + {%- trans %}The data you entered are nod valid.{% endtrans -%} +{% elif login_error == S_C.BAD_REQUEST %} + {%- trans %}Bad request, please contact your service administrator{% endtrans -%} +{% else %} + {%- trans %}An unknown error occurred, please contact your service administrator.{% endtrans -%} +{% endif %} +{% endblock login_error_message %} + +{% block login_right_top %} +{% if login_url is defined %} + <div id="login_link"> + <a href="{{login_url}}"> + {%- trans %}Go to login page{% endtrans -%} + </a> + </div> +{% endif %} +{% endblock login_right_top %} + +{% block login_form %} +{% call form.form(class='register') %} + {{ field.meta('type', 'register') }} + {{ field.text("login", _("Login"), + required=true, + pattern=S_C.REG_LOGIN_RE, + title=_("Login must be lower case, with only plain letters (a-z), numbers (0-9) or underscore(_)"), + value=login, + )}} + {{ field.email("email", _("Email"), + required=true, + value=email, + )}} + {{ field.password("password", _("Password"), + required=true, + minlength=S_C.PASSWORD_MIN_LENGTH, + value=password, + )}} + {{ field.submit(_("Register new account")) }} +{% endcall %} +{% endblock login_form %} + +{% block login_right_bottom %}{% endblock %}