diff --git a/src/fellchensammlung/forms.py b/src/fellchensammlung/forms.py index 922ebe7..63b69e2 100644 --- a/src/fellchensammlung/forms.py +++ b/src/fellchensammlung/forms.py @@ -106,13 +106,6 @@ class ReportCommentForm(forms.ModelForm): class CommentForm(forms.ModelForm): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.form_class = 'form-comments' - self.helper.add_input(Hidden('action', 'comment')) - self.helper.add_input(Submit('submit', _('Kommentieren'), css_class="button is-primary")) - class Meta: model = Comment fields = ('text',) diff --git a/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html b/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html index a62f6f8..c21268c 100644 --- a/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html +++ b/src/fellchensammlung/templates/fellchensammlung/forms/form-comment.html @@ -1,5 +1,4 @@ {% load i18n %} -{% load crispy_forms_tags %}
@@ -10,6 +9,11 @@
- {% crispy comment_form %} +
+ {% csrf_token %} + + {{ comment_form }} + +
\ No newline at end of file