2014-11-17 11:06:35 +01:00
|
|
|
{% extends "layout/base.html" %}
|
2014-11-26 10:20:46 +01:00
|
|
|
{% block head%}
|
|
|
|
{% load crispy_forms_tags %}
|
2014-12-08 13:45:54 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
|
|
|
$('#presentationform #presentationpersonformset').formset({
|
2014-12-11 10:06:42 +01:00
|
|
|
prefix: '{{ person_formset.prefix }}',
|
|
|
|
addText: 'weitere Person hinzufügen',
|
|
|
|
deleteText: 'eine Person entfernen',
|
|
|
|
addCssClass: 'add-row',
|
|
|
|
deleteCssClass: 'delete-row',
|
|
|
|
formCssClass: 'dynamic-form',
|
|
|
|
extraClasses: []
|
2014-12-10 16:28:21 +01:00
|
|
|
});
|
|
|
|
$('#presentationform #presentationeventformset').formset({
|
2014-12-11 10:06:42 +01:00
|
|
|
prefix: '{{ event_formset.prefix }}',
|
|
|
|
addText: 'weitere Veranstaltung hinzufügen',
|
|
|
|
deleteText: 'eine Veranstaltung entfernen',
|
|
|
|
addCssClass: 'add-row',
|
|
|
|
deleteCssClass: 'delete-row',
|
|
|
|
formCssClass: 'dynamic-form',
|
|
|
|
extraClasses: []
|
2014-12-08 13:45:54 +01:00
|
|
|
});
|
|
|
|
})
|
|
|
|
</script>
|
2014-11-26 10:20:46 +01:00
|
|
|
{% endblock %}
|
2014-11-17 11:06:35 +01:00
|
|
|
{% block content %}
|
2014-12-11 11:45:48 +01:00
|
|
|
{% if success %}
|
|
|
|
<div class="alert alert-success" role="alert">
|
|
|
|
Vortrag erfolgreich gespeichert!
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
{% endif %}
|
|
|
|
{% if error %}
|
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
Unvollständige oder fehlerhafte Angaben!<br>
|
|
|
|
Bitte vervollständigen Sie Ihre Angaben und versuchen Sie es erneut!
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
{% endif %}
|
2014-12-08 12:21:13 +01:00
|
|
|
<form method="POST" action="" class="form-horizontal" id="presentationform">
|
|
|
|
{% crispy presentation_form %}
|
2014-12-10 16:28:21 +01:00
|
|
|
<hr>
|
2014-12-08 12:21:13 +01:00
|
|
|
<h3>Personen</h3>
|
2014-12-10 16:28:21 +01:00
|
|
|
<div>
|
|
|
|
<input id="id_{{ person_formset.prefix }}-TOTAL_FORMS" name="{{ person_formset.prefix }}-TOTAL_FORMS" type="hidden" value="1" />
|
|
|
|
<input id="id_{{ person_formset.prefix }}-INITIAL_FORMS" name="{{ person_formset.prefix }}-INITIAL_FORMS" type="hidden" value="0" />
|
|
|
|
<input id="id_{{ person_formset.prefix }}-MAX_NUM_FORMS" name="{{ person_formset.prefix }}-MAX_NUM_FORMS" type="hidden" value="1000" />
|
|
|
|
</div>
|
|
|
|
<div id="presentationpersonformset">
|
|
|
|
{% for person_form in person_formset.forms %}
|
2014-12-08 12:21:13 +01:00
|
|
|
<div class="person_form">
|
2014-12-10 16:28:21 +01:00
|
|
|
{% crispy person_form person_formhelper %}
|
2014-12-08 12:21:13 +01:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2014-12-10 16:28:21 +01:00
|
|
|
</div>
|
2014-12-11 11:45:48 +01:00
|
|
|
<hr>
|
2014-12-08 12:21:13 +01:00
|
|
|
<h3>Veranstaltungen</h3>
|
2014-12-10 16:28:21 +01:00
|
|
|
<div>
|
|
|
|
<input id="id_{{ event_formset.prefix }}-TOTAL_FORMS" name="{{ event_formset.prefix }}-TOTAL_FORMS" type="hidden" value="1" />
|
|
|
|
<input id="id_{{ event_formset.prefix }}-INITIAL_FORMS" name="{{ event_formset.prefix }}-INITIAL_FORMS" type="hidden" value="0" />
|
|
|
|
<input id="id_{{ event_formset.prefix }}-MAX_NUM_FORMS" name="{{ event_formset.prefix }}-MAX_NUM_FORMS" type="hidden" value="1000" />
|
|
|
|
</div>
|
|
|
|
<div id="presentationeventformset">
|
|
|
|
{% for event_form in event_formset.forms %}
|
2014-12-08 12:21:13 +01:00
|
|
|
<div class="event_form">
|
2014-12-10 16:28:21 +01:00
|
|
|
{% crispy event_form event_formhelper %}
|
2014-12-08 12:21:13 +01:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2014-12-10 16:28:21 +01:00
|
|
|
</div>
|
2014-12-11 11:45:48 +01:00
|
|
|
<hr>
|
2014-12-08 12:21:13 +01:00
|
|
|
<input type="submit" class="btn btn-primary btn-default" value="Submit">
|
|
|
|
</form>
|
2014-12-11 11:45:48 +01:00
|
|
|
<hr>
|
|
|
|
<a href="{% url 'frontend-index' %}">zurück zum Index</a><br>
|
2014-11-17 11:06:35 +01:00
|
|
|
{% endblock %}
|