refactor: change comment form to bulma
This commit is contained in:
		@@ -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',)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
{% load crispy_forms_tags %}
 | 
			
		||||
 | 
			
		||||
<div class="card">
 | 
			
		||||
    <div class="card-header">
 | 
			
		||||
@@ -10,6 +9,11 @@
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="card-content">
 | 
			
		||||
        {% crispy comment_form %}
 | 
			
		||||
        <form method="POST">
 | 
			
		||||
            {% csrf_token %}
 | 
			
		||||
            <input type="hidden" name="action" value="comment">
 | 
			
		||||
            {{ comment_form }}
 | 
			
		||||
            <input type="submit" class="button is-primary" value="{% trans 'Kommentieren' %}">
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
		Reference in New Issue
	
	Block a user