""" This module holds the forms of the ``brainstormers`` app. """

from django import forms
from django.forms.widgets import HiddenInput

from .models import Metaplan, MetaplanProposition, MetaplanTemplate


class MetaplanTemplateForm(forms.ModelForm):
    class Meta:
        model = MetaplanTemplate
        fields = ('name', 'training')
        widgets = {
            'training': HiddenInput()
        }


class MetaplanTemplateOrderForm(forms.ModelForm):
    class Meta:
        model = MetaplanTemplate
        fields = ('sort_order',)


class MetaplanForm(forms.ModelForm):
    class Meta:
        model = Metaplan
        fields = ('name', 'session')
        widgets = {
            'session': HiddenInput()
        }


class MetaplanPropositionForm(forms.ModelForm):
    class Meta:
        model = MetaplanProposition
        fields = ('text', 'group', 'user', 'metaplan')
        widgets = {
            'metaplan': HiddenInput()
        }
