Refactor case collection form to use crispy forms for improved layout and styling

This commit is contained in:
Ross
2025-08-04 13:19:19 +01:00
parent b3304b6113
commit 816b2adde2
2 changed files with 160 additions and 92 deletions
@@ -1,5 +1,6 @@
{% extends "atlas/exams.html" %}
<!-- {% load static from static %} -->
{% load crispy_forms_tags %}
{% block css %}
{% endblock %}
@@ -36,7 +37,7 @@
<form class="highlight" action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %}
{{ form }}
{% crispy form form.helper %}
{% comment %} <h3>Cases:</h3>
Add cases here. These can only be added once created (they can also be added to cases on creation). Click and drag to change order.
<input type="button" value="Add More Cases" id="add_more_case">
@@ -60,7 +61,7 @@
{{ case_formset.empty_form }}
</li>
</div> {% endcomment %}
<input type="submit" class="submit-button" value="Submit" name="submit">
{% comment %} <input type="submit" class="submit-button" value="Submit" name="submit"> {% endcomment %}
</form>
<script>
$(document).ready(() => {