| 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 | )}} |
| 38 | {{ field.email("email", _("Email"), |
| 39 | required=true, |
| 40 | value=email, |
| 41 | )}} |
| 42 | {{ field.password("password", _("Password"), |
| 43 | required=true, |
| 44 | minlength=S_C.PASSWORD_MIN_LENGTH, |
| 45 | value=password, |
| 46 | )}} |
| 47 | {{ field.submit(_("Register new account")) }} |
| 48 | {% endcall %} |
| 49 | {% endblock login_form %} |
| 50 | |
| 51 | {% block login_right_bottom %}{% endblock %} |