Fix template path for question review block and remove unnecessary form wrapper to prevent nested forms

This commit is contained in:
Ross
2025-10-27 11:27:59 +00:00
parent 74c5f4d8fd
commit a38c31ca87
2 changed files with 8 additions and 4 deletions
@@ -114,8 +114,12 @@
{% comment %} <span class="btn btn-sm btn-outline-success" data-bs-toggle="modal" data-bs-target="#reviewModal" hx-get="{% url 'sbas:question_set_review' question.pk %}?edit=1&new=1" hx-target="#review-form" hx-swap="innerHTML" hx-trigger="load">Add Review</button> {% endcomment %}
<form id="review-form">
{% include 'generic/partials/question_review_form.html' with app_name='sbas' question=question form=form %}
</form>
{% comment %} The included partial contains its own <form> with hx-post. Do not wrap it in another form (nested forms break submission). {% endcomment %}
{% include 'generic/partials/question_review_form.html' with app_name='sbas' question=question form=form %}
<div id="question-review-block" class="mt-4">
{# Placeholder while HTMX fetches review/block #}
</div>
{% endblock %}