citavi_mapper/frontend/templates/hello.html

53 lines
2.0 KiB
HTML

{% extends "layout/base.html" %}
{% block head%}
{% load crispy_forms_tags %}
<script type="text/javascript">
$(function() {
$('#presentationform #presentationpersonformset').formset({
prefix: '{{ person_formset.prefix }}'
});
$('#presentationform #presentationeventformset').formset({
prefix: '{{ event_formset.prefix }}'
});
})
</script>
{% endblock %}
{% block content %}
<a href="{% url 'frontend-index' %}">zurück</a><br>
<h2>Vortrag anlegen</h2>
<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>
<hr>
{% endfor %}
</div>
<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>
<hr>
{% endfor %}
</div>
<br>
<input type="submit" class="btn btn-primary btn-default" value="Submit">
</form>
{% endblock %}