Add example answers form rendering and update viewer iframe

This commit is contained in:
Ross
2025-10-05 22:24:40 +01:00
parent 63f399d2c1
commit 974966e855
3 changed files with 39 additions and 1 deletions
@@ -0,0 +1,17 @@
{% load static %}
{# Render a small example answers form for a given CaseDetail - expects a context variable `form` (JsonAnswerForm) #}
<form method="POST" class="post-form">
{% csrf_token %}
{# Include any media the field needs (json-editor) #}
{% if form.media %}
{{ form.media }}
{% endif %}
<div class="json-editor-wrapper">
{{ form.json_answer }}
</div>
<div class="mt-2">
<button type="submit" name="submit" value="answer" class="btn btn-primary">Save Correct Answers</button>
</div>
</form>
+1 -1
View File
@@ -119,7 +119,7 @@
</div>
</div>
{% comment %} <iframe id="viewer" style="width: 100%; height: 500px; border: none"></iframe> {% endcomment %}
<iframe id="viewer" style="width: 100%; height: 500px; border: none"></iframe>
</div>
</div>
{% endblock %}