block tags, bleh (migdal compatibility)
[prawokultury.git] / prawokultury / templates / contact / register / form.html
1 {% extends "base.html" %}
2 {% load i18n chunks %}
3
4 {% block "titleextra" %}{{ form.form_title }} :: {% endblock %}
5
6 {% block "body" %}
7     <h1>{% block contact_form_title %}{{ form.form_title }}{% endblock %}</h1>
8
9
10 {% if not form.started %}
11   {# Not yet started. #}
12   <div class="form-info">
13     {% chunk "contact_form__"|add:form.form_tag|add:"__not_started" %}
14   </div>
15 {% else %}
16   {# Already started. #}
17   {% if form.limit_reached %}
18     {# Already closed. #}
19     <div class="form-info">
20       {% chunk "contact_form__"|add:form.form_tag|add:"__closed" %}
21     </div>
22   {% else %}
23     {# Still running. #}
24     <div class="form-info">
25         {% chunk "contact_form__"|add:form.form_tag|add:"__running" %}
26     </div>
27     <form method="POST" action="." enctype="multipart/form-data" class="submit-form">
28       {% csrf_token %}
29       <table>
30         {% if form.non_field_errors %}<tr><td colspan="2">{{ form.non_field_errors }}</td></tr>{% endif %}
31         {% for field in form.main_fields %}
32           {% include "snippets/field_as_table_row.html" %}
33         {% endfor %}
34         <tr><td colspan="2"><h3>{% trans "We would be grateful if you could answer our questions below. This will allow us to better adapt to your expectations in the future." %}</h3></td></tr>
35         {% for field in form.survey_fields %}
36           {% include "snippets/field_as_table_row.html" %}
37         {% endfor %}
38         <tr><td colspan="2"></td></tr>
39         {% for field in form.agreement_fields %}
40           {% include "snippets/field_as_table_row.html" %}
41         {% endfor %}
42         <tr><td></td><td><button>{% block contact_form_submit %}{{ form.submit_label }}{% endblock %}</button></td></tr>
43       </table>
44     </form>
45   {% endif %}
46 {% endif %}
47
48 <script type="text/javascript" src="/static/js/prefill.js"></script>
49
50 {% endblock %}