citavi_mapper/frontend/templates/presentation-add.html

76 lines
2.7 KiB
HTML
Raw Normal View History

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 %}
<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: []
2014-12-10 16:28:21 +01:00
});
$('#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>
2014-11-26 10:20:46 +01:00
{% endblock %}
2014-11-17 11:06:35 +01:00
{% 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 %}
2014-12-10 16:28:21 +01:00
<hr>
<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 %}
<div class="person_form">
2014-12-10 16:28:21 +01:00
{% crispy person_form person_formhelper %}
</div>
{% endfor %}
2014-12-10 16:28:21 +01:00
</div>
<hr>
<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 %}
<div class="event_form">
2014-12-10 16:28:21 +01:00
{% crispy event_form event_formhelper %}
</div>
{% endfor %}
2014-12-10 16:28:21 +01:00
</div>
<hr>
<input type="submit" class="btn btn-primary btn-default" value="Submit">
</form>
<hr>
<a href="{% url 'frontend-index' %}">zurück zum Index</a><br>
2014-11-17 11:06:35 +01:00
{% endblock %}