diff --git a/core/templates/register_user.html b/core/templates/register_user.html index c798538..79a200f 100644 --- a/core/templates/register_user.html +++ b/core/templates/register_user.html @@ -23,97 +23,106 @@ {% endfor %} {% endif %}
-
-
- -
-
+
+
+ +
+
-
+
-
-

{% trans "User Register" %}

-
-
+
+

{% trans "User Register" %}

+
+
-
+ {% csrf_token %} {% for field in form %} -
- {% if field.field.required %} - - {% else %} - - {% endif %} -
- {% if field.auto_id == 'id_birth_date' %} - {% render_field field class='form-control input-sm date-picker' %} - - {{ field.help_text }} - {% elif field.auto_id == 'id_image' %} - {% render_field field class='form-control input-sm' %} -
- - - - -
- {% elif field.auto_id == 'id_curriculum' %} - {% render_field field class='form-control input-sm' %} -
- - - - +
+
+
+ {% if field.field.required %} + + {% else %} + + {% endif %}
- {% elif field.auto_id == 'id_cpf' %} - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} - - {% elif field.auto_id == 'id_year_titration' %} - {% render_field field class='form-control' onkeypress='campoNumerico(this,event);' %} +
+ {% if field.auto_id == 'id_birth_date' %} + {% render_field field class='form-control date-picker' %} + {% elif field.auto_id == 'id_image' %} + {% render_field field class='form-control' %} +
+ + + + +
+ {% elif field.auto_id == 'id_curriculum' %} + {% render_field field class='form-control' %} +
+ + + + +
+ {% elif field.auto_id == 'id_cpf' %} + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} - {% elif field.auto_id == 'id_phone' %} - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} - {% else %} - {% render_field field class='form-control' %} - {{ field.help_text }} - {% endif %} -
+ {% elif field.auto_id == 'id_year_titration' %} + {% render_field field class='form-control' onkeypress='campoNumerico(this,event);' %} - {% if field.errors %} -
- {% endif %}
{% endfor %} -
- -
-
+ {% endblock %} diff --git a/users/models.py b/users/models.py index 29a9e0f..20b3823 100644 --- a/users/models.py +++ b/users/models.py @@ -20,14 +20,14 @@ class User(AbstractBaseUser, PermissionsMixin): city = models.CharField(_('City'), max_length = 90, blank = True) state = models.CharField(_('State'), max_length = 30, blank = True) gender = models.CharField(_('Gender'), max_length = 1, choices = (('M', _('Male')), ('F', _('Female')))) - image = models.ImageField(verbose_name = _('Image'), null=True, blank = True, upload_to = 'users/') + image = models.ImageField(verbose_name = _('Photo'), null=True, blank = True, upload_to = 'users/') birth_date = models.DateField(_('Birth Date'), null=True) phone = models.CharField(_('Phone'), max_length = 30, blank = True) - cpf = models.CharField(_('Cpf'), max_length = 15) + cpf = models.CharField(_('CPF'), max_length = 15, blank=True, null=True) type_profile = models.IntegerField(_('Type'), null = True, blank = True, choices = ((1, _('Professor')), (2, _('Student'))), default=2) titration = models.CharField(_('Titration'), max_length = 50, blank = True, null = True) year_titration = models.CharField(_('Year of titration'), max_length = 4, blank = True, null = True) - institution = models.CharField(_('Institution where he had titration'), max_length = 50, blank=True, null=True) + institution = models.CharField(_('Institution'), max_length = 50, blank=True, null=True) curriculum = models.FileField(verbose_name = _('Curriculum'), upload_to='users/curriculum/', null=True, blank=True) date_created = models.DateTimeField(_('Create Date'), auto_now_add = True) is_staff = models.BooleanField(_('Administrador'), default = False) -- libgit2 0.21.2