Quiz form validation and minor UI fixes
This commit is contained in:
parent
633e1387ea
commit
28024874d6
@ -14,9 +14,18 @@
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="title-1">Add questions [{{ quiz_obj|truncatechars:15 }}]</div>
|
||||
<br><br>
|
||||
{{ formset.non_form_errors }}
|
||||
<div class="title-1 mb-3">Add questions [{{ quiz_obj|truncatechars:15 }}]</div>
|
||||
|
||||
{% if formset.non_form_errors %}
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
{% for e in formset.non_form_errors %}
|
||||
<li>{{ e }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="container">
|
||||
<div class="info-text bg-orange mb-3">{{ quizQuestions }} question added</div>
|
||||
|
||||
@ -40,11 +49,11 @@
|
||||
<label for="username">{{ fs.label }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">{{ fs.correct }} <small class="ml-1">Correct</small></span>
|
||||
<span class="input-group-text">{{ fs.correct }} <small class="ms-1">Correct</small></span>
|
||||
</div>
|
||||
{{ fs.choice }}
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">{{ fs.DELETE }} <small class="ml-1">Delete</small></span>
|
||||
<span class="input-group-text">{{ fs.DELETE }} <small class="ms-1">Delete</small></span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@ -72,6 +72,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% empty %}
|
||||
<h4 class="text-center mt-5 py-5 text-muted">
|
||||
<i class="fa-regular fa-folder-open me-2"></i> Course quizzes will appear here.
|
||||
</h4>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user