"""This module contains the forms for the ``ideas`` app"""

from django import forms
from django.utils.translation import ugettext_lazy as _

from mtp.apps.trainings.forms import TrainingActivityForm

from .models import Brainstorming, QuestionWall, WordCloud


class BaseIdeaActivityForm(TrainingActivityForm):
    """Base Form for the ``ideas`` activity models"""

    is_anonymous = forms.BooleanField(
        required=False,
        label=_('Anonymous')
    )

    class Meta:
        fields = TrainingActivityForm.Meta.fields + (
            'is_anonymous',
        )


class BrainstormingForm(BaseIdeaActivityForm):
    """Form for the ``Brainstorming`` model"""

    class Meta:
        fields = BaseIdeaActivityForm.Meta.fields
        model = Brainstorming


class QuestionWallForm(BaseIdeaActivityForm):
    """Form for the ``QuestionWall`` model"""

    class Meta:
        fields = BaseIdeaActivityForm.Meta.fields
        model = QuestionWall


class WordCloudForm(BaseIdeaActivityForm):
    """Form for the ``WordCloud`` model"""

    class Meta:
        fields = BaseIdeaActivityForm.Meta.fields
        model = WordCloud

