Add FRCR toggle functionality to question detail view

This commit is contained in:
Ross
2025-10-29 21:37:19 +00:00
parent dca4ff249a
commit 76d0db0e94
4 changed files with 47 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
<button
class="btn btn-sm {% if question.frcr_appropriate %}btn-success{% else %}btn-outline-secondary{% endif %}"
hx-post="{% url 'sbas:toggle_frcr' pk=question.pk %}"
hx-swap="outerHTML"
title="Toggle FRCR-appropriate"
>
{% if question.frcr_appropriate %}
<i class="bi bi-check-circle me-1" aria-hidden="true"></i>FRCR
{% else %}
<i class="bi bi-x-circle me-1" aria-hidden="true"></i>FRCR
{% endif %}
</button>
+5
View File
@@ -209,6 +209,11 @@
{% endif %}
</div>
</div>
<div class="mb-2"><strong>FRCR appropriate:</strong>
<div>
{% include 'sbas/_frcr_toggle.html' %}
</div>
</div>
</div>
</div>
</div>