diff --git a/dasettings/forms.py b/dasettings/forms.py index 011a41e..b227296 100644 --- a/dasettings/forms.py +++ b/dasettings/forms.py @@ -7,16 +7,6 @@ from bootstrap_datepicker_plus import DatePickerInput from django.utils.translation import gettext as _ from timemanagement.models import AbsenceReason -class AgencyTimeManagement(forms.ModelForm): - class Meta: - model = Agency - - fields = ['module_timemanagement_ze'] - - labels = { - 'module_timemanagement_ze' : "Zeiterfassung aktivieren" - } - class AgencyOrganigrammForm(forms.ModelForm): class Meta: model = Agency @@ -36,7 +26,6 @@ class AgencyNetworkForm(forms.ModelForm): "publicjoin" : "Beitritt ohne Bestätigung" } - # Change logged Users Data (Usernamen an Email) NUR HIER MÖGLICH! class UsersSelfChangeForm(forms.ModelForm): email = forms.EmailField() @@ -74,16 +63,21 @@ class UserTimeForm(forms.ModelForm): "wd_tu" : "Dienstag", "wd_we" : "Mittwoch", "wd_th" : "Donnerstag", - "wd_fr" : "Freitag", + "wd_fr" : "Freitag", + "usetime" : "Zeiterfassung" , + "usetime_start" : "Zeiterfassung ab" } - fields = ["startdate", "wd_mo", "wd_tu", "wd_we", "wd_th", "wd_fr", "loose_holidedate"] + fields = ["startdate", "usetime", "usetime_start", "wd_mo", "wd_tu", "wd_we", "wd_th", "wd_fr", "loose_holidedate"] widgets = { - "startdate" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}) + "startdate" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}), + "usetime_start" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}) } def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['startdate'].required = True + self.fields['usetime_start'].required = False + self.fields['usetime'].required = False # PERMISSION GROUPS FORM @@ -116,8 +110,8 @@ class AgencyModulsForm(forms.ModelForm): 'module_organigramm' : "Organigramm", 'module_messages' : "Mitteilungen", 'module_chat' : "Chat", - #'module_timemanagement' : "Abwesenheits- und Zeiterfassung", - 'module_timemanagement' : "Abwesenheitsplanung", + 'module_timemanagement' : "Abwesenheits- und Zeiterfassung", + #'module_timemanagement' : "Abwesenheitsplanung", } fields = ['module_news','module_organizer','module_files','module_organigramm', 'module_messages', 'module_chat', 'module_timemanagement'] diff --git a/dasettings/templates/dasettings/modulesettings_timemanagement.html b/dasettings/templates/dasettings/modulesettings_timemanagement.html index e1afd01..0a73032 100644 --- a/dasettings/templates/dasettings/modulesettings_timemanagement.html +++ b/dasettings/templates/dasettings/modulesettings_timemanagement.html @@ -48,7 +48,7 @@ type: "GET", url: "{% url 'modsettings-tm' %}", data:{ - aze: $("#id_module_timemanagement_ze").prop('checked') + //aze: $("#id_module_timemanagement_ze").prop('checked') }, success: function( data ) { diff --git a/dasettings/templates/dasettings/user_usprof.html b/dasettings/templates/dasettings/user_usprof.html index 88a2929..8e34672 100644 --- a/dasettings/templates/dasettings/user_usprof.html +++ b/dasettings/templates/dasettings/user_usprof.html @@ -164,9 +164,17 @@