Add configurable due time suggestions
This commit is contained in:
+3
-1
@@ -57,7 +57,7 @@ class UserSettingsForm(forms.ModelForm):
|
||||
class UserPreferenceForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = UserPreference
|
||||
fields = ['language', 'show_notes', 'show_open_todos', 'show_done_todos', 'show_links', 'due_first', 'overview_lines']
|
||||
fields = ['language', 'show_notes', 'show_open_todos', 'show_done_todos', 'show_links', 'due_first', 'overview_lines', 'due_time_suggestions']
|
||||
labels = {
|
||||
'language': _('Language'),
|
||||
'show_notes': _('Show notes'),
|
||||
@@ -66,10 +66,12 @@ class UserPreferenceForm(forms.ModelForm):
|
||||
'show_links': _('Show links'),
|
||||
'due_first': _('Always show due items first'),
|
||||
'overview_lines': _('Lines in overview'),
|
||||
'due_time_suggestions': _('Time suggestions for tasks'),
|
||||
}
|
||||
widgets = {
|
||||
'language': forms.Select(attrs={'class': 'form-select'}),
|
||||
'overview_lines': forms.NumberInput(attrs={'class': 'form-control', 'min': 1, 'max': 50}),
|
||||
'due_time_suggestions': forms.Textarea(attrs={'class': 'form-control', 'rows': 3, 'placeholder': '08:00 Morgen\n12:00 Mittag\n17:00 Abend'}),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user