chol
/
eva
forked from tohe/eva
1
0
Fork 0

new radiobutton for E/V/A. no functionality at the moment

This commit is contained in:
Benni Bärmann 2021-01-20 11:02:22 +01:00
parent 02fddf6cc3
commit 5df881fa75
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,5 @@
from django.db import models from django.db import models
from django.forms import ModelForm, DateInput, Form from django.forms import ModelForm, DateInput, Form, ChoiceField, RadioSelect
from .models import Employee from .models import Employee
@ -19,7 +19,12 @@ class FdbForm(ModelForm):
'''this base class provides the required css class for all forms''' '''this base class provides the required css class for all forms'''
required_css_class = 'required' required_css_class = 'required'
TYPE_CHOICES = {'IN': 'Eintritt', 'CHANGE': 'Veränderung', 'OUT': 'Austritt'}
class PersonalForm(FdbForm): class PersonalForm(FdbForm):
choice = ChoiceField(choices=TYPE_CHOICES.items(), widget=RadioSelect,
label='Welcher Prozess soll angestoßen werden?')
class Meta: class Meta:
model = Employee model = Employee
fields = ['firstname', 'lastname', 'email', 'department', 'team',] fields = ['firstname', 'lastname', 'email', 'department', 'team',]