[TASK] Move dynamic formset configuration to template.

This commit is contained in:
Jan Philipp Timme 2014-12-11 10:06:42 +01:00
parent e7fc6dcb8a
commit 5839ec3bbc
1 changed files with 14 additions and 2 deletions

View File

@ -4,10 +4,22 @@
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$('#presentationform #presentationpersonformset').formset({ $('#presentationform #presentationpersonformset').formset({
prefix: '{{ person_formset.prefix }}' 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({ $('#presentationform #presentationeventformset').formset({
prefix: '{{ event_formset.prefix }}' prefix: '{{ event_formset.prefix }}',
addText: 'weitere Veranstaltung hinzufügen',
deleteText: 'eine Veranstaltung entfernen',
addCssClass: 'add-row',
deleteCssClass: 'delete-row',
formCssClass: 'dynamic-form',
extraClasses: []
}); });
}) })
</script> </script>