Refactor exam collection form layout for improved readability and structure
This commit is contained in:
@@ -16,9 +16,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="card mb-4">
|
<h2 class="mb-4">Edit Exam Collection <small class="text-muted">{{ object.name }}</small></h2>
|
||||||
<div class="card-body">
|
|
||||||
<h2 class="card-title">Edit Exam Collection <small class="text-muted">{{ object.name }}</small></h2>
|
|
||||||
|
|
||||||
<form action="" method="post" enctype="multipart/form-data" id="examcollection-form" class="needs-validation" novalidate>
|
<form action="" method="post" enctype="multipart/form-data" id="examcollection-form" class="needs-validation" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
@@ -84,9 +82,8 @@
|
|||||||
|
|
||||||
<hr class="my-3" />
|
<hr class="my-3" />
|
||||||
|
|
||||||
<div class="card mb-3">
|
<div class="mb-3">
|
||||||
<div class="card-body">
|
<h5 class="mb-2">Authors</h5>
|
||||||
<h5 class="card-title mb-2">Authors</h5>
|
|
||||||
<div>
|
<div>
|
||||||
{{ form.author }}
|
{{ form.author }}
|
||||||
{% if form.author.errors %}
|
{% if form.author.errors %}
|
||||||
@@ -94,14 +91,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row row-cols-1 row-cols-md-2 g-3">
|
<div class="row row-cols-1 row-cols-md-2 g-3">
|
||||||
{% for label, field_name, bound in exam_groups %}
|
{% for label, field_name, bound in exam_groups %}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="card">
|
<div class="p-3 border rounded h-100">
|
||||||
<div class="card-body">
|
<h6 class="small mb-2 text-muted">{{ label }}</h6>
|
||||||
<h5 class="card-title small mb-2">{{ label }}</h5>
|
|
||||||
<div>
|
<div>
|
||||||
{{ bound }}
|
{{ bound }}
|
||||||
{% if bound.errors %}
|
{% if bound.errors %}
|
||||||
@@ -110,7 +105,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -137,8 +131,6 @@
|
|||||||
<button type="reset" class="btn btn-light">Reset</button>
|
<button type="reset" class="btn btn-light">Reset</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
<script>
|
||||||
// Simple client-side bootstrap validation
|
// Simple client-side bootstrap validation
|
||||||
(function () {
|
(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user