From 430f9c673710d106bd3143b39c07c5484743f45d Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Thu, 18 Apr 2024 11:06:43 +0300 Subject: [PATCH] storage: Add an option to include help text to directory selection form Signed-off-by: Veiko Aasa Reviewed-by: Sunil Mohan Adapa --- plinth/modules/storage/forms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plinth/modules/storage/forms.py b/plinth/modules/storage/forms.py index 232cdc9bb..a8f77103b 100644 --- a/plinth/modules/storage/forms.py +++ b/plinth/modules/storage/forms.py @@ -89,11 +89,11 @@ class DirectorySelectForm(forms.Form): storage_subdir = forms.CharField(label=_('Subdirectory (optional)'), required=False) - def __init__(self, title=None, default='/', validator=DirectoryValidator, - *args, **kwargs): + def __init__(self, title=None, help_text='', default='/', + validator=DirectoryValidator, *args, **kwargs): super().__init__(*args, **kwargs) - if title: - self.fields['storage_dir'].label = title + self.fields['storage_dir'].label = title + self.fields['storage_dir'].help_text = help_text self.validator = validator self.default = default self.set_form_data()