From fb8794906d9c51e384fa3bc94134afad4a4bec00 Mon Sep 17 00:00:00 2001 From: Zambom Date: Wed, 30 Aug 2017 22:54:08 -0300 Subject: [PATCH] Adjusting bugs involving images in user registration --- users/templates/users/register.html | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 24 deletions(-) diff --git a/users/templates/users/register.html b/users/templates/users/register.html index b3a429f..7a4c395 100644 --- a/users/templates/users/register.html +++ b/users/templates/users/register.html @@ -41,22 +41,37 @@ -
+ {% csrf_token %} {% for field in form %}
{% if field.auto_id == 'id_image' %} - {% render_field field class='form-control' %} -
- - - - -
+ + + {% render_field field class='form-control file-selector' %} + +
+ + + + +
+ +
+ {% if acc.image %} +
+ + {{ acc.image.path }} + {% else %} + {% trans 'Click or drop the file here' %}
+ + {% trans 'The photo could not exceed 2MB.' %} + {% endif %} +
{% else %} {% if field.auto_id == 'id_show_email' %} {% else %} @@ -66,21 +81,34 @@ {% endif %} {{ field.help_text }} - {% if field.errors %} -
- -
- {% endif %}
+ + {% if field.errors %} +
+ +
+ {% endif %} + + {% if field.auto_id == 'id_image' %} + + {% endif %}
{% endfor %} @@ -102,6 +130,43 @@ {% include 'users/modal_crop.html' %} + + {% endblock %} -- libgit2 0.21.2