Skip to content

Commit b3607d2

Browse files
committed
Change survey
1 parent 9ef7cef commit b3607d2

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

experiments/forms.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@ class HeatMapFeedbackForm(forms.Form):
5151
execution_id = forms.IntegerField(
5252
widget=forms.HiddenInput(), required=True)
5353
corresponds_to_perception = forms.BooleanField(
54-
label='Na sua percepção o gráfico ao lado corresponde a realidade?',
55-
initial=True, required=False)
54+
label='O gráfico ao lado exibe as áreas da função para onde você precisou olhar com mais frequência para entender o código. Você concorda com ele?',
55+
initial=False, required=False)
5656
notes = forms.CharField(
5757
label='Gostaria de deixar algum comentário?',
5858
max_length=500, widget=forms.Textarea, required=False)
5959

60+
def __init__(self, *args, **kwargs):
61+
super(HeatMapFeedbackForm, self).__init__(*args, **kwargs)
62+
self.fields['notes'].widget.attrs['class'] = 'form-control'
63+
6064
def save_heat_map_feedback(self):
6165
corresponds_to_perception = self.cleaned_data[
6266
'corresponds_to_perception'

experiments/templates/heat_map.html

+7-9
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,23 @@
1313
<div class="jumbotron">
1414
<div class="row">
1515
<div class="col-sm-9" style="height: 100%">
16-
<img src="{{ execution_heatmap_url }}" style="width: 100%; object-fit: contain; top: 0; position: relative; di">
16+
<img src="{{ execution_heatmap_url }}" style="width: 100%; object-fit: contain; top: 0; position: relative;">
1717
</div>
1818
<div class="col-sm-3">
1919
<form method="post">
2020
{% csrf_token %}
2121

2222
{{ form.execution_id }}
2323

24-
{% for field in form.visible_fields %}
2524
<div class="form-group">
26-
{{ field.label_tag }}
27-
{% render_field field class="form-control" %}
28-
{% if field.help_text %}
29-
<small class="form-text text-muted">{{ field.help_text }}</small>
30-
{% endif %}
25+
{{ form.corresponds_to_perception.label_tag }}
26+
Sim: {{ form.corresponds_to_perception }}
3127
</div>
32-
{% endfor %}
33-
</table>
3428

29+
<div class="form-group">
30+
{{ form.notes.label_tag }}
31+
{{ form.notes }}
32+
</div>
3533
<button type="submit" class="btn btn-primary">Enviar</button>
3634
</form>
3735
</div>

0 commit comments

Comments
 (0)