diff --git a/users/forms.py b/users/forms.py index d30f102..ea43577 100644 --- a/users/forms.py +++ b/users/forms.py @@ -45,7 +45,7 @@ class UpdateUserForm(forms.ModelForm): def validate_cpf(self, cpf): cpf = ''.join(re.findall('\d', str(cpf))) - + if cpfcnpj.validate(cpf): return True return False @@ -71,4 +71,4 @@ class UpdateProfileForm(UpdateUserForm): class Meta: model = User - fields = ['username', 'name', 'email', 'birth_date', 'city', 'state', 'gender', 'cpf', 'phone', 'image'] + fields = ['username', 'name', 'email', 'birth_date', 'city', 'state', 'gender', 'cpf', 'phone', 'image', 'curriculum'] diff --git a/users/templates/users/edit_profile.html b/users/templates/users/edit_profile.html index fe089e5..79ec3f2 100644 --- a/users/templates/users/edit_profile.html +++ b/users/templates/users/edit_profile.html @@ -46,7 +46,7 @@ {% elif field.auto_id == 'id_is_staff' or field.auto_id == 'id_is_active' %}
{% elif field.auto_id == 'id_cpf' %} @@ -72,16 +72,16 @@ {% endif %} {% endfor %} -
- +
+
-
- {% trans 'Cancel' %} +
- +
{% endblock %} diff --git a/users/templates/users/profile.html b/users/templates/users/profile.html index 537cac0..5a9f6bd 100644 --- a/users/templates/users/profile.html +++ b/users/templates/users/profile.html @@ -14,13 +14,15 @@ {% block sidebar %} @@ -37,106 +39,85 @@ {% endfor %} {% endif %} - -
-
- logo amadeus -
-
-
-
-
-
-
- foto perfil -
-
- - - - - - - - - - - - - - - - - - - -
Status:Offline
Nome:{{user}}
Login:{{user.username}}
Email:{{user.email}}
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tipo de usuário:{{use.type_profile}}
CPF:{{user.cpf}}
Número de telefone:{{user.phone}}
Sexo:{{user.gender}}
Data de Nascimento:{{user.birth_date}}
Estado e Cidade:{{user.state}} - {{user.city}}
Titulação:Mestrado
Ano:2012
Instituição:UFPE
Currículo:-
-
-
+
+
+
+ foto perfil
-
-
-
- {% trans 'Edit Profile' %} +
+ + + + + + + + + + + + + + + + + + + +
Status:Offline
Nome:{{user}}
Login:{{user.username}}
Email:{{user.email}}
-
- +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tipo de usuário:{{use.type_profile}}
CPF:{{user.cpf}}
Número de telefone:{{user.phone}}
Sexo:{{user.gender}}
Data de Nascimento:{{user.birth_date}}
Estado e Cidade:{{user.state}} - {{user.city}}
Titulação:Mestrado
Ano:2012
Instituição:UFPE
Currículo:-
-
- +
- -
{% endblock %} diff --git a/users/templates/users/update.html b/users/templates/users/update.html index 96345e9..c3e18f9 100644 --- a/users/templates/users/update.html +++ b/users/templates/users/update.html @@ -24,7 +24,7 @@
{% endfor %} {% endif %} - +
@@ -51,7 +51,7 @@ {% elif field.auto_id == 'id_phone' %} {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} - + {% elif field.auto_id == 'id_is_staff' or field.auto_id == 'id_is_active' %}
{% endfor %}
- +
-- libgit2 0.21.2