From 22b8a4ac186a7e2de11383c4bd54016984b50005 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 13 Jan 2020 11:44:27 +0100 Subject: [PATCH] added help texts to storage form --- cookbook/forms.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cookbook/forms.py b/cookbook/forms.py index 04e089700..be4628fe7 100644 --- a/cookbook/forms.py +++ b/cookbook/forms.py @@ -71,14 +71,21 @@ class KeywordForm(forms.ModelForm): class StorageForm(forms.ModelForm): username = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password'}), required=False) password = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}), - required=False) + required=False, + help_text=_('Leave empty for dropbox and enter app password for nextcloud.')) token = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}), - required=False) + required=False, + help_text=_('Leave empty for nextcloud and enter api token for dropbox.')) class Meta: model = Storage fields = ('name', 'method', 'username', 'password', 'token', 'url') + help_texts = { + 'url': _( + 'Leave empty for dropbox and enter only base url for nextcloud (/remote.php/webdav/ is added automatically.'), + } + class RecipeBookForm(forms.ModelForm): class Meta: