Skip to content

Commit dd5ec2c

Browse files
committed
Add labels to the fields in ProposalForm
Django's default label generation doesn't suffice in some cases. One of them being acronyms. Signed-off-by: Nabarun Pal <[email protected]>
1 parent d84f748 commit dd5ec2c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

junction/proposals/forms.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class ProposalForm(forms.Form):
9292
widget=PagedownWidget(show_preview=True), help_text=("Describe your Proposal")
9393
)
9494
target_audience = forms.ChoiceField(
95+
label="Target Audience",
9596
choices=ProposalTargetAudience.CHOICES,
9697
widget=forms.Select(attrs={"class": "dropdown"}),
9798
)
@@ -103,33 +104,40 @@ class ProposalForm(forms.Form):
103104
" Make the proposal PUBLIC when you're done editing."
104105
),
105106
)
106-
proposal_type = forms.ChoiceField(widget=forms.Select(attrs={"class": "dropdown"}))
107+
proposal_type = forms.ChoiceField(
108+
label="Proposal Type", widget=forms.Select(attrs={"class": "dropdown"})
109+
)
107110
proposal_section = forms.ChoiceField(
108-
widget=forms.Select(attrs={"class": "dropdown"})
111+
label="Proposal Section", widget=forms.Select(attrs={"class": "dropdown"})
109112
)
110113

111114
# Additional Content
112115
prerequisites = forms.CharField(
116+
label="Pre-requisites",
113117
widget=PagedownWidget(show_preview=True),
114118
required=False,
115119
help_text="What should the participants know before attending your session?",
116120
)
117121
video_url = forms.CharField(
122+
label="Video URL",
118123
required=False,
119124
help_text="Short 1-2 min video describing your talk",
120125
widget=forms.TextInput(attrs={"class": "charfield"}),
121126
)
122127
content_urls = forms.CharField(
128+
label="Content URLs",
123129
widget=PagedownWidget(show_preview=True),
124130
required=False,
125131
help_text="Links to your session like GitHub repo, Blog, Slideshare etc ...",
126132
)
127133
speaker_info = forms.CharField(
134+
label="Speaker Information",
128135
widget=PagedownWidget(show_preview=True),
129136
required=False,
130137
help_text="Say something about yourself, work etc...",
131138
)
132139
speaker_links = forms.CharField(
140+
label="Speaker Links",
133141
widget=PagedownWidget(show_preview=True),
134142
required=False,
135143
help_text="Links to your previous work like Blog, Open Source Contributions etc ...",

0 commit comments

Comments
 (0)