Add configurable due time suggestions

This commit is contained in:
rucki
2026-09-11 17:36:38 +02:00
parent 1cd2d06b4b
commit 504f58aa36
8 changed files with 90 additions and 7 deletions
+3 -1
View File
@@ -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'}),
}