from django import forms

from MMTest.core.forms import NamedElementForm
from MMTest.variables.models import Variable


class VariableForm(NamedElementForm):
    class Meta(NamedElementForm.Meta):
        model = Variable
        fields = NamedElementForm.Meta.fields + ['variable_type', 'data_type']
        widgets = NamedElementForm.Meta.widgets
        widgets['variable_type'] = forms.Select(attrs={'class':
                                                       'form-control'})
        widgets['data_type'] = forms.Select(attrs={'class': 'form-control'})
