new radiobutton for E/V/A. no functionality at the moment
This commit is contained in:
parent
02fddf6cc3
commit
5df881fa75
|
@ -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',]
|
||||||
|
|
Loading…
Reference in New Issue