+ {% for note in object.area_search_status.status_notes.all %}
+
+
{% trans "Note" %}
+
{{ note.note }}
+
+
+
{% trans "Preparer" %}
+
{{ note.preparer }}
+
+
+
{% trans "Time stamp" %}
+
{{ note.time_stamp|date:"G:i j.n.Y" }}
+
+ {% endfor %}
+
+
+
+ {% endif %}
+
+
+
+
diff --git a/plotsearch/templates/mixins/section.html b/plotsearch/templates/mixins/section.html
index af1c1ecd..8941936e 100644
--- a/plotsearch/templates/mixins/section.html
+++ b/plotsearch/templates/mixins/section.html
@@ -1,29 +1,45 @@
-{% for subsection in section.subsections.all %}
- {% include "mixins/section.html" with section=subsection %}
-{% endfor %}
+{% load entry_filter %}
+{% load form_visible %}
+
+{% if section.fields.all and section.visible == True %}
+
+
{{ section }}
+
+ {% for field in section.fields.all %}
+ {% if field.enabled == True %}
+
+
+ {{ field }}
+
+ {% for entry in field.entry_set.all|filter_answer:answer %}
+
+ {% if field.type.identifier == "checkbox" or field.type.identifier == "radiobutton" or field.type.identifier == "radiobuttoninline" %}
+ {% fetch_choice_value entry.value entry.field.id %}
+ {% if not entry.value %}
+ -
+ {% endif %}
+
+ {% else %}
+ {{ entry.value }}
+ {% if not entry.value %}
+ -
+ {% endif %}
+ {% endif %}
+ {% empty %}
+ -
+
+ {% endfor %}
+
+ {% endif %}
-{% if section.fields.all %}
-
-
{{ section }}
-
- {% for field in section.fields.all %}
-
-
- {{field}}
-
-
- {% for entry in field.entry_set.all %}
- {{ entry.value }}
- {% if not entry.value%}
- -
- {% endif %}
- {% empty %}
- -
- {% endfor %}
-
-
- {% endfor %}
-
+ {% endfor %}
+
+
-
{% endif %}
+
+{% for subsection in section.subsections.all %}
+ {% if subsection.applicant_type|slugify == applicant_type|slugify or subsection.applicant_type|slugify == "Both"|slugify %}
+ {% include "mixins/section.html" with section=subsection %}
+ {% endif %}
+{% endfor %}
diff --git a/plotsearch/templates/target_status/detail.html b/plotsearch/templates/target_status/detail.html
index a1e0dda7..460ae2c7 100644
--- a/plotsearch/templates/target_status/detail.html
+++ b/plotsearch/templates/target_status/detail.html
@@ -1,4 +1,7 @@
{% load static %}
+{% load form_visible %}
+{% load entry_filter %}
+
@@ -15,10 +18,10 @@
{{ object.application_identifier }}
- {% for section in object.plot_search_target.plot_search.form.sections.all %}
- {% include "mixins/section.html" with section=section %}
+ {% for section in object.plot_search_target.plot_search.form.sections.all|filter_only_parent %}
+ {% include "mixins/section.html" with section=section answer=object.answer %}
{% endfor %}
-