Make title length in form consistent with title length in model.

This commit is contained in:
Dane Kennedy 2025-05-28 17:21:50 +02:00
parent 8bdf3ce525
commit 54502ac3ea

View File

@ -129,8 +129,8 @@ class EditTicketForm(CustomFieldMixin, forms.ModelForm):
# Since title is max 100 characters limit it in editing
if "title" in self.fields:
self.fields["title"].max_length = 100
self.fields["title"].widget.attrs["maxlength"] = 100
self.fields["title"].max_length = 200
self.fields["title"].widget.attrs["maxlength"] = 200
# Disable and add help_text to the merged_to field on this form
self.fields["merged_to"].disabled = True
@ -272,7 +272,7 @@ class AbstractTicketForm(CustomFieldMixin, forms.Form):
)
title = forms.CharField(
max_length=100,
max_length=200,
required=True,
widget=forms.TextInput(attrs={"class": "form-control"}),
label=_("Summary of the problem"),