stage 2: message on save
[edumed.git] / stage2 / templates / stage2 / participant.html
1 {% extends 'base.html' %}
2 {% load textile_pl from fnp_markup %}
3 {% load chunks %}
4
5 {% block title %}II etap{% endblock %}
6
7 {% block body %}
8   <h1>II etap Olimpiady Cyfrowej</h1>
9
10   {% if messages %}
11     <ul class="messages">
12         {% for message in messages %}
13             <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
14         {% endfor %}
15     </ul>
16   {% endif %}
17
18   {% chunk 'stage2_header' %}
19
20   {% for assignment in assignments %}
21     {% if assignment.title %}
22       <h2>{{ assignment.title }} (do {{ assignment.deadline }})</h2>
23     {% endif %}
24     <p class="box-button" style="max-width: 15em;">
25       <a href="{{ assignment.content_url }}" target="_blank" class="nice-button"><strong>Zobacz treść zadania</strong></a>
26     </p>
27     <form method="POST" action="" enctype="multipart/form-data" class="submit-form">
28       {% csrf_token %}
29       {% for form, attachment in assignment.attachment_forms %}
30         {{ form.assignment_id }}
31         <p><strong>{{ form.file.label }}:</strong></p>
32         <p>
33           {% if assignment.is_active %}{{ form.file }}{% endif %}
34           {% if attachment.file %}
35             <a href="{{ attachment.download_url }}">{{ attachment.filename }}</a>
36             ({{ attachment.file.size|filesizeformat }})
37           {% else %}
38             (nie wysłano pliku)
39           {% endif %}
40         </p>
41       {% endfor %}
42       {% for form in assignment.field_forms %}
43         {{ form.assignment_id }}
44         <p><strong>{{ form.value.label }}:</strong></p>
45         {{ form.value.errors }}
46         <p>
47           {% if assignment.is_active %}{{ form.value }}{% else %}{{ form.value.value }}{% endif %}
48         </p>
49       {% endfor %}
50       {% if assignment.is_active %}<input type="submit" value="Zapisz"/>{% endif %}
51     </form>
52   {% endfor %}
53
54
55 {% endblock %}