pedagogy: moderation interface

This commit is contained in:
2019-06-20 12:15:12 +02:00
parent 3d0f5c0a15
commit 04009a6a5b
3 changed files with 73 additions and 3 deletions

View File

@ -23,6 +23,7 @@
#
from django import forms
from django.utils.translation import ugettext_lazy as _
from core.views.forms import MarkdownInput
from core.models import User
@ -122,3 +123,15 @@ class UVCommentReportForm(forms.ModelForm):
self.fields["reporter"].initial = reporter_id
self.fields["comment"].queryset = UVComment.objects.filter(id=comment_id).all()
self.fields["comment"].initial = comment_id
class UVCommentModerationForm(forms.Form):
"""
Form handeling bulk comment deletion
"""
reports = forms.ModelMultipleChoiceField(
UVCommentReport.objects.all(),
label=_("Reported comments"),
widget=forms.CheckboxSelectMultiple,
)