Commit ae5f663ebc1799aebfaae590d8c9a7e92411d28a

Authored by ailsoncgt
1 parent 491a6d8c

Titration fields #14

@@ -75,4 +75,5 @@ class RegisterUserForm(forms.ModelForm): @@ -75,4 +75,5 @@ class RegisterUserForm(forms.ModelForm):
75 class Meta: 75 class Meta:
76 model = User 76 model = User
77 # exclude = ['is_staff', 'is_active'] 77 # exclude = ['is_staff', 'is_active']
78 - fields = ['username', 'name', 'email', 'city', 'state', 'gender', 'cpf', 'birth_date', 'phone', 'image']  
79 \ No newline at end of file 78 \ No newline at end of file
  79 + fields = ['username', 'name', 'email', 'city', 'state', 'gender', 'cpf', 'birth_date', 'phone', 'image', 'titration',
  80 + 'year_titration', 'institution', 'curriculum',]
80 \ No newline at end of file 81 \ No newline at end of file
core/templates/register_user.html
@@ -59,9 +59,22 @@ @@ -59,9 +59,22 @@
59 </button> 59 </button>
60 </span> 60 </span>
61 </div> 61 </div>
  62 + {% elif field.auto_id == 'id_curriculum' %}
  63 + {% render_field field class='form-control input-sm' %}
  64 + <div class="input-group">
  65 + <input type="text" readonly="" class="form-control" placeholder="{% trans 'Chose your file ...' %}">
  66 + <span class="input-group-btn input-group-sm">
  67 + <button type="button" class="btn btn-fab btn-fab-mini">
  68 + <i class="material-icons">attach_file</i>
  69 + </button>
  70 + </span>
  71 + </div>
62 {% elif field.auto_id == 'id_cpf' %} 72 {% elif field.auto_id == 'id_cpf' %}
63 {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} 73 {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %}
64 74
  75 + {% elif field.auto_id == 'id_year_titration' %}
  76 + {% render_field field class='form-control' onkeypress='campoNumerico(this,event);' %}
  77 +
65 {% elif field.auto_id == 'id_phone' %} 78 {% elif field.auto_id == 'id_phone' %}
66 {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} 79 {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %}
67 {% else %} 80 {% else %}