From 3f633e0b042ddaf52eed6936f8e6a3b11569bf7c Mon Sep 17 00:00:00 2001 From: sandeepsajan0 <sandeepsajan0@gmail.com> Date: Fri, 25 Mar 2022 18:43:01 +0530 Subject: [PATCH] Prepopulate the required block label and help_text fields --- hypha/apply/funds/blocks.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hypha/apply/funds/blocks.py b/hypha/apply/funds/blocks.py index 48d49381b..9a458e415 100644 --- a/hypha/apply/funds/blocks.py +++ b/hypha/apply/funds/blocks.py @@ -27,6 +27,8 @@ class ApplicationMustIncludeFieldBlock(MustIncludeFieldBlock): class TitleBlock(ApplicationMustIncludeFieldBlock): name = 'title' description = 'The title of the project' + field_label = blocks.CharBlock(label=_('Label'), default=_('What is the title of your application?')) + help_text = blocks.TextBlock(required=False, label=_('Help text'), default=_("This project name can be changed if a full proposal is requested.")) class Meta: label = _('Application title') @@ -48,6 +50,10 @@ class ValueBlock(ApplicationSingleIncludeFieldBlock): class EmailBlock(ApplicationMustIncludeFieldBlock): name = 'email' description = 'The applicant email address' + field_label = blocks.CharBlock(label=_('Label'), default=_('What email address should we use to contact you?')) + help_text = blocks.TextBlock(required=False, label=_('Help text'), + default=_("We will use this email address to communicate with you about your proposal.")) + widget = forms.EmailInput field_class = forms.EmailField @@ -93,6 +99,9 @@ class AddressFieldBlock(ApplicationSingleIncludeFieldBlock): class FullNameBlock(ApplicationMustIncludeFieldBlock): name = 'full_name' description = 'Full name' + field_label = blocks.CharBlock(label=_('Label'), default=_('What is your name?')) + help_text = blocks.TextBlock(required=False, label=_('Help text'), + default=_("We will use this name when we communicate with you about your proposal.")) class Meta: icon = 'user' -- GitLab