Mobile is BooleanField now.
This commit is contained in:
parent
07a90dae8c
commit
2de76d44d5
5
TODO
5
TODO
|
@ -0,0 +1,5 @@
|
|||
- remove empty lines in mail
|
||||
|
||||
- in mail ändern "Deine mailadresse" in "ansprechpartner_in"
|
||||
|
||||
- true/false übersetzen in dataloop
|
|
@ -21,10 +21,10 @@ VENDOR_CHOICES = {'STANDARD': 'Dell Latitude',
|
|||
OS_CHOICES = {'UBU': 'Ubuntu (Standard)',
|
||||
'WIN': 'Windows (bitte Begründung angeben)',}
|
||||
|
||||
MOBILE_CHOICES = {'NO': 'Kein Mobiltelefon',
|
||||
'SIMPLE': 'Einfaches Gerät für Erreichbarkeit',
|
||||
'SINGLE': 'Smartphone, Single SIM',
|
||||
'DUAL': 'Smartphone, Dual SIM',}
|
||||
# MOBILE_CHOICES = {'NO': 'Kein Mobiltelefon',
|
||||
# 'SIMPLE': 'Einfaches Gerät für Erreichbarkeit',
|
||||
# 'SINGLE': 'Smartphone, Single SIM',
|
||||
# 'DUAL': 'Smartphone, Dual SIM',}
|
||||
|
||||
LANG_CHOICES = {'GER': 'Deutsch',
|
||||
'ENG': 'English',}
|
||||
|
@ -62,16 +62,17 @@ class Employee(models.Model):
|
|||
jobdescription_english = models.CharField(null=True, max_length=100, verbose_name="Job description(english)")
|
||||
remote = models.BooleanField(verbose_name='Braucht keinen Arbeitsplatz weil Home-Office', default=False)
|
||||
desk = models.CharField(max_length=100, null=True, blank=True, verbose_name="Wo soll der Arbeitsplatz sein?")
|
||||
|
||||
|
||||
# IT related stuff
|
||||
laptop = models.CharField(max_length=2, choices=LAPTOP_CHOICES.items(), default='14')
|
||||
vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD')
|
||||
os = models.CharField(max_length=3, choices=OS_CHOICES.items(), default='UBU')
|
||||
screen = models.BooleanField(default=False, verbose_name='Zusätzlicher Monitor? Einer ist standard.')
|
||||
mobile = models.CharField(max_length=6, default='NO')
|
||||
mobile = models.BooleanField(max_length=6, default=False)
|
||||
sim = models.BooleanField(default=False, verbose_name="Mobilfunkvertrag")
|
||||
sim2 = models.BooleanField(default=False, verbose_name="Zweite Sim (für Laptop zB)")
|
||||
landline = models.BooleanField(default=True, verbose_name="Festnetztelefon")
|
||||
sim2 = models.BooleanField(default=False, verbose_name="Zweite Sim (für Laptop zB)") # do we still need this?
|
||||
landline = models.BooleanField(default=True, verbose_name="Festnetztelefon") # do we still need this?
|
||||
# TODO: tastaturlayout DE/US
|
||||
comment = models.TextField(max_length=500, null=True, blank=True, verbose_name="zusätzliche IT-Anforderungen")
|
||||
language = models.CharField(max_length=3, choices=LANG_CHOICES.items(), default="GER")
|
||||
accounts = MultiSelectField(choices=ACCOUNT_CHOICES.items(), null=True)
|
||||
|
|
|
@ -12,7 +12,7 @@ from django.conf import settings
|
|||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
|
||||
from .models import Employee, DEPARTMENT_CHOICES, LAPTOP_CHOICES, OS_CHOICES, VENDOR_CHOICES, \
|
||||
MOBILE_CHOICES, LANG_CHOICES, ACCOUNT_CHOICES, TRANSPONDER_CHOICES
|
||||
LANG_CHOICES, ACCOUNT_CHOICES, TRANSPONDER_CHOICES
|
||||
from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm,\
|
||||
ChangeForm, TYPE_CHOICES
|
||||
from .settings import MAILS, EVA_MAIL, BASIC_DATA, ONLY_ONBOARDING
|
||||
|
@ -164,7 +164,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
|
|||
|
||||
# update values in data dictionary with keys from *_CHOICES if present there
|
||||
choices = {**DEPARTMENT_CHOICES, **LAPTOP_CHOICES, **TRANSPONDER_CHOICES,
|
||||
**OS_CHOICES, **MOBILE_CHOICES, **LANG_CHOICES, **VENDOR_CHOICES}
|
||||
**OS_CHOICES, **LANG_CHOICES, **VENDOR_CHOICES}
|
||||
data.update({k:choices[v] for k,v in data.items() \
|
||||
if isinstance(v,collections.abc.Hashable) \
|
||||
and v in choices})
|
||||
|
|
Loading…
Reference in New Issue