84 lines
2.9 KiB
HTML
84 lines
2.9 KiB
HTML
{% extends "layout/base.html" %}
|
|
{% block head%}
|
|
{% load crispy_forms_tags %}
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
$('#presentationform #presentationpersonformset').formset({
|
|
prefix: '{{ person_formset.prefix }}',
|
|
addText: 'weitere Person hinzufügen',
|
|
deleteText: 'eine Person entfernen',
|
|
addCssClass: 'add-row',
|
|
deleteCssClass: 'delete-row',
|
|
formCssClass: 'dynamic-form',
|
|
extraClasses: []
|
|
});
|
|
$('#presentationform #presentationeventformset').formset({
|
|
prefix: '{{ event_formset.prefix }}',
|
|
addText: 'weitere Veranstaltung hinzufügen',
|
|
deleteText: 'eine Veranstaltung entfernen',
|
|
addCssClass: 'add-row',
|
|
deleteCssClass: 'delete-row',
|
|
formCssClass: 'dynamic-form',
|
|
extraClasses: []
|
|
});
|
|
})
|
|
</script>
|
|
<style type="text/css">
|
|
.add-row, .delete-row, .submit-btn {
|
|
margin-left: 50%;
|
|
}
|
|
</style>
|
|
{{ event_formset.media }}
|
|
{% endblock %}
|
|
{% block content %}
|
|
{% 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 %}
|
|
<form method="POST" action="" class="form-horizontal" id="presentationform">
|
|
{% crispy presentation_form %}
|
|
<hr>
|
|
<h3>Personen</h3>
|
|
<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 %}
|
|
<div class="person_form">
|
|
{% crispy person_form person_formhelper %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<hr>
|
|
<h3>Veranstaltungen</h3>
|
|
<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 %}
|
|
<div class="event_form">
|
|
{% crispy event_form event_formhelper %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<hr>
|
|
{% crispy submission_form %}
|
|
<hr>
|
|
<input type="submit" class="btn btn-primary btn-default submit-btn" value="Submit">
|
|
</form>
|
|
<hr>
|
|
<a href="{% url 'frontend-index' %}">zurück zum Index</a><br>
|
|
{% endblock %} |