Skip to content

Commit

Permalink
feat: (continue) adding support for dependent answers
Browse files Browse the repository at this point in the history
  • Loading branch information
kennedykori committed Nov 19, 2021
1 parent 4bc14ee commit 193457a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fahari/templates/fragments/atoms/sims/question_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
<div class="row mt-3 mb-0 pt-2">
<div class="col-sm-1"></div>
<div class="col-sm-7 border-left border-secondary">
{{ question.precedence }}.
{% include "fragments/atoms/sims/question_details_and_comment_block.html" %}
{% include "fragments/atoms/sims/sub_question_details_and_comment_block.html" %}
</div>
<div class="col-sm-1">
<!-- This empty column acts as spacer between the answer and the question. -->
</div>
<div class="col-sm-3">
{% include "fragments/atoms/sims/capture_question_answer_block.html" %}
{% include "fragments/atoms/sims/sub_question_capture_question_answer_block.html" %}
</div>
</div>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% load static i18n compress %}
<div class="row">
<div class="col">
{% include "fragments/atoms/sims/capture_question_answer_block.html" %}
</div>
</div>
{% with question as parent_question %}
{% for question in parent_question.sub_questions.active.by_precedence %}
{% include "fragments/atoms/sims/sub_question_capture_question_answer_block.html" %}
{% endfor %}
{% endwith %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% load static i18n compress %}
{{ question.precedence }}.
{% include "fragments/atoms/sims/question_details_and_comment_block.html" %}

<div class="col border-left border-secondary">
{% with question as parent_question %}
{% for question in parent_question.sub_questions.active.by_precedence %}
{% include "fragments/atoms/sims/sub_question_details_and_comment_block.html" %}
{% endfor %}
{% endwith %}
</div>

0 comments on commit 193457a

Please sign in to comment.