pretty much working version
[koed-quiz.git] / apps / quiz / templates / quiz / question_detail.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load url from future %}
4
5
6 {% block "title" %}{{ question.quiz.name }}{% endblock %}
7 {% block "header" %}{{ question.quiz.name }}{% endblock %}
8
9
10 {% block "body" %}
11
12
13 <h2>{{ question.title }}</h2>
14 <div>
15 {{ question.text|safe }}
16 </div>
17
18 <div>
19
20
21
22 <form class='question' method='post'>
23 {% csrf_token %}
24 {{ form.answer.errors }}
25 {{ form.answer }}
26
27 {% if valid %}
28     <button>{% trans "Send answer" %}</button>
29
30     {% if previous_url %}
31         <a class='button' href='{{ previous_url }}'>{% trans "Back to last question" %}</a>
32     {% endif %}
33
34 {% else %}
35     {% if valid_url %}
36         <a class='big-button' href='{{ valid_url }}'>{% trans "Back to my test" %}</a>
37     {% else %}
38         <a class='big-button' href='{% url "quiz" %}'>{% trans "Start from the beginning" %}</a>
39     {% endif %}
40 {% endif %}
41
42 </form>
43 </div>
44
45
46 <div id='description'>
47 {{ question.description|safe }}
48 </div>
49
50
51 {% endblock %}