mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-20 01:27:44 +02:00
Merge pull request #1270 from kennedydane/main
Make title length in form consistent with title length in model.
This commit is contained in:
commit
653a9f983d
@ -129,8 +129,10 @@ class EditTicketForm(CustomFieldMixin, forms.ModelForm):
|
|||||||
|
|
||||||
# Since title is max 100 characters limit it in editing
|
# Since title is max 100 characters limit it in editing
|
||||||
if "title" in self.fields:
|
if "title" in self.fields:
|
||||||
self.fields["title"].max_length = 100
|
self.fields["title"].max_length = Ticket._meta.get_field("title").max_length
|
||||||
self.fields["title"].widget.attrs["maxlength"] = 100
|
self.fields["title"].widget.attrs["maxlength"] = Ticket._meta.get_field(
|
||||||
|
"title"
|
||||||
|
).max_length
|
||||||
|
|
||||||
# Disable and add help_text to the merged_to field on this form
|
# Disable and add help_text to the merged_to field on this form
|
||||||
self.fields["merged_to"].disabled = True
|
self.fields["merged_to"].disabled = True
|
||||||
@ -272,7 +274,7 @@ class AbstractTicketForm(CustomFieldMixin, forms.Form):
|
|||||||
)
|
)
|
||||||
|
|
||||||
title = forms.CharField(
|
title = forms.CharField(
|
||||||
max_length=100,
|
max_length=200,
|
||||||
required=True,
|
required=True,
|
||||||
widget=forms.TextInput(attrs={"class": "form-control"}),
|
widget=forms.TextInput(attrs={"class": "form-control"}),
|
||||||
label=_("Summary of the problem"),
|
label=_("Summary of the problem"),
|
||||||
|
17
helpdesk/migrations/0039_alter_ticketchange_field.py
Normal file
17
helpdesk/migrations/0039_alter_ticketchange_field.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 5.2.1 on 2025-06-02 09:56
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("helpdesk", "0038_checklist_checklisttemplate_checklisttask"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="ticketchange",
|
||||||
|
name="field",
|
||||||
|
field=models.CharField(max_length=200, verbose_name="Field"),
|
||||||
|
),
|
||||||
|
]
|
@ -1161,7 +1161,7 @@ class TicketChange(models.Model):
|
|||||||
|
|
||||||
field = models.CharField(
|
field = models.CharField(
|
||||||
_("Field"),
|
_("Field"),
|
||||||
max_length=100,
|
max_length=200,
|
||||||
)
|
)
|
||||||
|
|
||||||
old_value = models.TextField(
|
old_value = models.TextField(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user