Skip to content

Commit 2066969

Browse files
committed
display no marks reason dropdown on forms
1 parent 9d55c56 commit 2066969

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

crowdsourcer/forms.py

+2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ class Meta:
121121
"private_notes",
122122
"public_notes",
123123
"question",
124+
"no_marks_reason",
124125
]
125126
widgets = {
126127
"authority": HiddenInput(),
@@ -318,6 +319,7 @@ class Meta:
318319
"public_notes",
319320
"question",
320321
"foi_answer_in_ror",
322+
"no_marks_reason",
321323
]
322324
widgets = {
323325
"authority": HiddenInput(),

crowdsourcer/templates/crowdsourcer/authority_audit_questions.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ <h4 class="form-label fs-6">Marker’s additional notes</h4>
117117
{{ q_form.orig.private_notes|default:"(none)"|linebreaks }}
118118
</div>
119119

120+
<h4 class="form-label fs-6">Marker’s reason for giving no marks (if applicable)</h4>
121+
<div class="read-only-answer mb-3 mb-md-4">
122+
{{ q_form.orig.no_marks_reason|default:"(none)"|linebreaks }}
123+
</div>
124+
120125
</div>
121126
<div class="col-lg-4 mt-4">
122127

@@ -182,6 +187,7 @@ <h3 class="h5 text-muted mb-3 mb-lg-4">Audited response</h3>
182187
{% endif %}
183188
"page_number": "{{ q_form.orig.page_number|default_if_none:''|escapejs }}",
184189
"private_notes": "{{ q_form.orig.private_notes|default_if_none:''|escapejs }}"
190+
"no_marks_reason": "{{ q_form.orig.no_marks_reason }}"
185191
}
186192
</script>
187193

@@ -205,6 +211,8 @@ <h3 class="h5 text-muted mb-3 mb-lg-4">Audited response</h3>
205211

206212
{% bootstrap_field q_form.private_notes %}
207213

214+
{% bootstrap_field q_form.no_marks_reason %}
215+
208216
{% if q_form.question_obj.how_marked == "foi" %}
209217
{% bootstrap_field q_form.foi_answer_in_ror %}
210218
{% endif %}
@@ -230,7 +238,7 @@ <h3 class="h5 text-muted mb-3 mb-lg-4">Audited response</h3>
230238
var audit_responses = el.closest('.js-audit-responses');
231239
var first_mark_responses = JSON.parse(audit_responses.querySelector('.js-first-mark-json').textContent);
232240

233-
["page_number", "evidence", "public_notes", "private_notes"].forEach(function(slug, i){
241+
["page_number", "evidence", "public_notes", "private_notes", "no_marks_reason"].forEach(function(slug, i){
234242
audit_responses.querySelector('[name$="' + slug + '"]').value = first_mark_responses[slug];
235243
});
236244

crowdsourcer/templates/crowdsourcer/includes/first_mark_response_form_fields.html

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
{% bootstrap_field q_form.private_notes %}
2222

23+
{% bootstrap_field q_form.no_marks_reason %}
24+
2325
{% if q_form.question_obj.how_marked == "foi" %}
2426
{% bootstrap_field q_form.foi_answer_in_ror %}
2527
{% endif %}

0 commit comments

Comments
 (0)