Refactor example answers form and remove unused iframe in collection view

This commit is contained in:
Ross
2025-10-05 22:41:49 +01:00
parent 974966e855
commit bdfa16bbb4
2 changed files with 4 additions and 12 deletions
@@ -1,17 +1,9 @@
{% 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 }}
{{ form.as_p}}
</div>
<div class="mt-2">
<button type="submit" name="submit" value="answer" class="btn btn-primary">Save Correct Answers</button>
</div>
</form>
</form>
+2 -2
View File
@@ -118,8 +118,6 @@
<div id="current-case-report"></div>
</div>
</div>
<iframe id="viewer" style="width: 100%; height: 500px; border: none"></iframe>
</div>
</div>
{% endblock %}
@@ -368,4 +366,6 @@
vertical-align: middle;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/jsoneditor.min.js"></script>
<script src="/static/django_jsonforms/jsoneditor_init.js"></script>
{% endblock css %}