From 6f5e75a1b30eed4d22c8c76740854b32d13b08a1 Mon Sep 17 00:00:00 2001 From: moanos Date: Fri, 20 Jun 2025 18:41:49 +0200 Subject: [PATCH] refactor: change comment form to bulma --- src/fellchensammlung/forms.py | 7 ------- .../templates/fellchensammlung/forms/form-comment.html | 8 ++++++-- 2 files changed, 6 insertions(+), 9 deletions(-) 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