This commit is contained in:
Ross
2024-08-18 22:29:48 +01:00
parent c2185f73a6
commit 3cb84fb7c4
6 changed files with 29 additions and 12 deletions
+3 -4
View File
@@ -1,5 +1,6 @@
{% extends view.model.app_name|add:"/base.html" %}
{% load crispy_forms_tags %}
{% block js %}
{{ form.media }}
{% endblock %}
@@ -7,12 +8,10 @@
{% block content %}
<h2>Add Exam</h2>
Create a new exam. Questions and candidates can be added later.
<form action="" method="post">
{% csrf_token %}
<table>
{{ form }}
</table>
<input type="submit" value="Submit">
{% crispy form form.helper %}
</form>
{% endblock %}
+2 -2
View File
@@ -60,9 +60,9 @@
{% if view_all %}
<a href="{% url app_name|add:':exam_list' %}">Hide archived</a>
<a href="{% url app_name|add:':exam_list' %}" >Hide archived</a>
{% else %}
<a href="{% url app_name|add:':exam_list_all' %}">View all</a>
<a href="{% url app_name|add:':exam_list_all' %}" title="Show all exams (including archived)">View all</a>
{% endif %}
</div>
{% include 'exam_overview_js.html' %}
+4 -1
View File
@@ -1,5 +1,7 @@
{% extends exam.app_name|add:"/exams.html" %}
{% load crispy_forms_tags %}
{% block js %}
{{ form.media }}
{% endblock %}
@@ -14,10 +16,11 @@
{% block content %}
<h2>Update Exam</h2>
This form allows you to edit the exam details. To manage candidates head to the <a href="{% url exam.app_name|add:':exam_cids' exam.pk %}">candidates</a> page.
<form action="" method="post">
{% csrf_token %}
<table>
{{ form.as_table }}
{{ form|crispy }}
</table>
<input type="submit" value="Submit">
</form>