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