diff --git a/corpus/accounts/forms.py b/corpus/accounts/forms.py index 6ae0471e..3a12b014 100644 --- a/corpus/accounts/forms.py +++ b/corpus/accounts/forms.py @@ -8,8 +8,9 @@ class CorpusCreationForm(UserCreationForm): - phone_no = forms.CharField(required=True) + phone_no = forms.CharField(required=True, max_length=10) gender = forms.ChoiceField(choices=GENDERS, required=True) + first_name = forms.CharField(max_length=30, required=True, help_text="Required.") error_css_class = "text-sm text-error" diff --git a/corpus/templates/accounts/login.html b/corpus/templates/accounts/login.html index ad981c6b..05e8c49c 100644 --- a/corpus/templates/accounts/login.html +++ b/corpus/templates/accounts/login.html @@ -5,32 +5,57 @@ {% endblock %} {% block content %} -
+
-

Login

+

Login

-
+ {% csrf_token %} {% if form.non_field_errors %} - {{ form.non_field_errors }} + {% for error in form.non_field_errors %} + + {% endfor %} {% endif %} -
- {% for field in form %} - - {% endfor %} +
+ + {{ form.username }} + {% if form.username.errors %} +
+ +
+ {% endif %} +
+ +
+ + {{ form.password }} + {% if form.password.errors %} +
+ +
+ {% endif %}
- -
+ +
-

If you don't have an account, register here.

+ +
+
OR
+
+ +
+

If you don't have an account, create one here.

+
-
+
{% endblock %} diff --git a/corpus/templates/accounts/signup.html b/corpus/templates/accounts/signup.html index ba2cfb68..2550b522 100644 --- a/corpus/templates/accounts/signup.html +++ b/corpus/templates/accounts/signup.html @@ -5,28 +5,114 @@ {% endblock %} {% block content %} -
+
-

Sign up

+

Sign Up

-
+ {% csrf_token %} -
- {% for field in form %} - + {% if form.non_field_errors %} + {% for error in form.non_field_errors %} + {% endfor %} + {% endif %} + +
+
+ + {{ form.first_name }} + {% if form.first_name.errors %} +
+ +
+ {% endif %} +
+ +
+ + {{ form.last_name }} + {% if form.last_name.errors %} +
+ +
+ {% endif %} +
+
+ +
+
+ + {{ form.phone_no }} + {% if form.phone_no.errors %} +
+ +
+ {% endif %} +
+ +
+ + {{ form.gender }} + {% if form.gender.errors %} +
+ +
+ {% endif %} +
+
+ + {{ form.email }} + {% if form.email.errors %} +
+ +
+ {% endif %} +
+ +
+
+ + {{ form.password1 }} + {% if form.password1.errors %} +
+ +
+ {% endif %} +
+ +
+ + {{ form.password2 }} + {% if form.password2.errors %} +
+ +
+ {% endif %} +
+
- -
+ +
-

If you already have an account, login instead.

-
+
{% endblock %} diff --git a/corpus/templates/base.html b/corpus/templates/base.html index 6dd90918..e08eaf0c 100644 --- a/corpus/templates/base.html +++ b/corpus/templates/base.html @@ -60,9 +60,12 @@ {% if messages %} {% for message in messages %} -
- {{ message }} -
+
+
+ {{ message }} + {{ message.id }} +
+
{% endfor %} {% endif %} @@ -85,6 +88,33 @@ {% block script %} {% endblock %} + +