Skip to content

Commit c0bfff6

Browse files
authored
Merge pull request #7243 from denyshon/tb-ver-question-details
Set maxlength for the ff_version & tb_version fields
2 parents 20c8803 + f281825 commit c0bfff6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kitsune/questions/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,14 @@ def __init__(self, product=None, *args, **kwargs):
108108
self.fields["ff_version"] = forms.CharField(
109109
label=FF_VERSION_LABEL,
110110
required=False,
111+
widget=forms.TextInput(attrs={"maxlength": 30 - len("Firefox ")}),
111112
)
112113

113114
if "tb_version" in extra_fields:
114115
self.fields["tb_version"] = forms.CharField(
115116
label=TB_VERSION_LABEL,
116117
required=False,
117-
widget=forms.TextInput(attrs={"placeholder": TB_VERSION_PLACEHOLDER}),
118+
widget=forms.TextInput(attrs={"placeholder": TB_VERSION_PLACEHOLDER, "maxlength": 30 - len("Thunderbird ")}),
118119
)
119120

120121
if "os" in extra_fields:

0 commit comments

Comments
 (0)