diff --git a/frontend/forms.py b/frontend/forms.py
index cb23e8b..ee0761e 100644
--- a/frontend/forms.py
+++ b/frontend/forms.py
@@ -87,16 +87,14 @@ class PresentationPersonForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(PresentationPersonForm, self).__init__(*args, **kwargs)
self.helper = FormHelper()
- self.helper.form_class = u'form-horizontal'
+ self.helper.form_tag = False
self.helper.label_class = u'col-lg-2'
self.helper.field_class = u'col-lg-4'
- self.helper.form_method = u'post'
self.helper.layout = Layout(
u'given_name',
u'additional_name',
u'family_name',
- u'hshmembership',
- Submit(u'send', u'Create', css_class=u'btn-default')
+ u'hshmembership'
)
given_name = forms.CharField(
@@ -134,20 +132,18 @@ class PresentationPersonForm(forms.ModelForm):
class PresentationEventForm(forms.ModelForm):
""" Form for the PresentationEventModel"""
def __init__(self, *args, **kwargs):
- super(PresentationPersonForm, self).__init__(*args, **kwargs)
+ super(PresentationEventForm, self).__init__(*args, **kwargs)
self.helper = FormHelper()
- self.helper.form_class = u'form-horizontal'
+ self.helper.form_tag = False
self.helper.label_class = u'col-lg-2'
self.helper.field_class = u'col-lg-4'
- self.helper.form_method = u'post'
self.helper.layout = Layout(
u'date',
u'name',
u'workshop',
u'place',
u'start_date',
- u'end_date',
- Submit(u'send', u'Create', css_class=u'btn-default')
+ u'end_date'
)
date = forms.DateField(
label=u"Datum",
@@ -184,15 +180,13 @@ class PresentationForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(PresentationForm, self).__init__(*args, **kwargs)
self.helper = FormHelper()
- self.helper.form_class = u'form-horizontal'
+ self.helper.form_tag = False
self.helper.label_class = u'col-lg-2'
self.helper.field_class = u'col-lg-4'
- self.helper.form_method = u'post'
self.helper.layout = Layout(
u'title',
u'type',
- u'abstract',
- Submit(u'send', u'Abschicken', css_class=u'btn-default')
+ u'abstract'
)
title = forms.CharField()
diff --git a/frontend/formsets.py b/frontend/formsets.py
index 1124ab7..eaf793c 100644
--- a/frontend/formsets.py
+++ b/frontend/formsets.py
@@ -1,19 +1,16 @@
-from fancy_formsets.forms import FancyBaseInlineFormSet
-
-
from frontend.models import Presentation, PresentationEvent, PresentationPerson
from django.forms.models import inlineformset_factory
PresentationPersonInlineFormset = inlineformset_factory(
Presentation,
PresentationPerson,
- formset=FancyBaseInlineFormSet,
- extra=1
+ extra=1,
+ can_delete=False
)
PresentationEventInlineFormset = inlineformset_factory(
Presentation,
PresentationEvent,
- formset=FancyBaseInlineFormSet,
- extra=1
-)
+ extra=1,
+ can_delete=False
+)
\ No newline at end of file
diff --git a/frontend/templates/hello.html b/frontend/templates/hello.html
index ce06c09..841d1ec 100644
--- a/frontend/templates/hello.html
+++ b/frontend/templates/hello.html
@@ -3,10 +3,30 @@
{% load crispy_forms_tags %}
{% endblock %}
{% block content %}
- hallo
- zurück
-
{% crispy presentation_form %}
-{% crispy person_formset %}
-{% crispy event_formset %}
+ zurück