111 lines
2.9 KiB
HTML
111 lines
2.9 KiB
HTML
{% extends "seminar/zadani/base.html" %}
|
|
{% load staticfiles %}
|
|
{% block script %}
|
|
<!--script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script!-->
|
|
{{form.media}}
|
|
<script src="{% static 'seminar/dynamic_formsets.js' %}"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>
|
|
{% block nadpis1a %}{% block nadpis1b %}
|
|
Vložit řešení
|
|
{% endblock %}{% endblock %}
|
|
</h1>
|
|
<form enctype="multipart/form-data" action="{% url 'seminar_nahraj_reseni' %}" method="post">
|
|
{% csrf_token %}
|
|
<table class='form' id="reseni">
|
|
<tr>
|
|
{% for field in form %}
|
|
<td>
|
|
<label class="field-label{% if field.field.required %} field-required{% endif %}" for="{{ field.id_for_label }}">
|
|
{{ field.label }}:
|
|
</label>
|
|
</td>
|
|
<td>
|
|
{{ field }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
|
|
{{ prilohy.management_form }}
|
|
|
|
<h4>Soubory s řešením</h4>
|
|
|
|
<div id="form_set">
|
|
{% for form in prilohy.forms %}
|
|
<div class="attachment">
|
|
{{ form.non_field_errors }}
|
|
{# {{ form.errors }} FIXME: možná tohle chceme zobrazovat? #}
|
|
<table class='form' id="reseni">
|
|
<tr>
|
|
{% for field in form.visible_fields %}
|
|
|
|
<td>
|
|
<label class="field-label{% if field.field.required %} field-required{% endif %}" for="{{ field.id_for_label }}">
|
|
{{ field.label }}:
|
|
</label>
|
|
|
|
</td>
|
|
<td {% if field.help_text %} class="field-with-comment"{% endif %}>
|
|
{{ field }}
|
|
<span class="field-comment">{{ field.help_text|safe }}
|
|
</td>
|
|
|
|
<td><span class="field-error">{{ field.errors }}</span></td>
|
|
|
|
{% endfor %}
|
|
|
|
<td>
|
|
<input type="button" value="Odebrat přílohu" class="remove_attachment" id="{{form.prefix}}-jsremove">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<input type="button" value="Přidat přílohu" id="add_attachment">
|
|
|
|
<div id="empty_form" style="display:none">
|
|
<div class="attachment">
|
|
|
|
<table class='form' id="reseni" class='no_error'>
|
|
<tr>
|
|
{% for field in prilohy.empty_form.visible_fields %}
|
|
|
|
<td>
|
|
<label class="field-label{% if field.field.required %} field-required{% endif %}" for="{{ field.id_for_label }}">
|
|
{{ field.label }}:
|
|
</label>
|
|
|
|
</td>
|
|
<td {% if field.help_text %} class="field-with-comment"{% endif %}>
|
|
{{ field }}
|
|
<span class="field-comment">{{ field.help_text|safe }}
|
|
</td>
|
|
|
|
<td><span class="field-error">{{ field.errors }}</span></td>
|
|
|
|
{% endfor %}
|
|
|
|
<td>
|
|
|
|
|
|
<input type="button" value="Odebrat přílohu" class="remove_attachment" id="id_prilohy-__prefix__-jsremove">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
<h4>Odevzdat řešení</h4>
|
|
<input type="submit" value="Odevzdat">
|
|
</form>
|
|
|
|
{% endblock %}
|