mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
add user registration routes
* Added /register get and post routes. + Added default attributes to AnonymousUser, including a new AnonymousList which behaves like an sqlalchemy relationship list. + aurweb.util: Added validation functions for various user fields used throughout registration. + test_accounts_routes: Added get|post register route tests. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
19b4a896f1
commit
c94793b0b1
6 changed files with 1140 additions and 3 deletions
30
templates/register.html
Normal file
30
templates/register.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends "partials/layout.html" %}
|
||||
|
||||
{% block pageContent %}
|
||||
<div class="box">
|
||||
<h2>{% trans %}Register{% endtrans %}</h2>
|
||||
|
||||
{% if complete %}
|
||||
{{
|
||||
"The account, %s%s%s, has been successfully created."
|
||||
| tr
|
||||
| format("<strong>", "'" + user.Username + "'", "</strong>")
|
||||
| safe
|
||||
}}
|
||||
<p>
|
||||
{% trans %}A password reset key has been sent to your e-mail address.{% endtrans %}
|
||||
</p>
|
||||
{% else %}
|
||||
{% if errors %}
|
||||
{% include "partials/error.html" %}
|
||||
{% else %}
|
||||
<p>
|
||||
{% trans %}Use this form to create an account.{% endtrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% set form_type = "NewAccount" %}
|
||||
{% include "partials/account_form.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue