mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-14 10:51:21 +01:00
Fix issue with public ticket form when using custom textarea fields.
This commit is contained in:
parent
208abd41f3
commit
e9667109ab
@ -323,7 +323,8 @@ class PublicTicketForm(forms.Form):
|
|||||||
fieldclass = forms.CharField
|
fieldclass = forms.CharField
|
||||||
instanceargs['max_length'] = field.max_length
|
instanceargs['max_length'] = field.max_length
|
||||||
elif field.data_type == 'text':
|
elif field.data_type == 'text':
|
||||||
fieldclass = forms.TextField
|
fieldclass = forms.CharField
|
||||||
|
instanceargs['widget'] = forms.Textarea
|
||||||
instanceargs['max_length'] = field.max_length
|
instanceargs['max_length'] = field.max_length
|
||||||
elif field.data_type == 'integer':
|
elif field.data_type == 'integer':
|
||||||
fieldclass = forms.IntegerField
|
fieldclass = forms.IntegerField
|
||||||
@ -333,8 +334,8 @@ class PublicTicketForm(forms.Form):
|
|||||||
instanceargs['max_digits'] = field.max_length
|
instanceargs['max_digits'] = field.max_length
|
||||||
elif field.data_type == 'list':
|
elif field.data_type == 'list':
|
||||||
fieldclass = forms.ChoiceField
|
fieldclass = forms.ChoiceField
|
||||||
choices = ()
|
choices = []
|
||||||
for line in field.choices:
|
for line in field.list_values.split("\n"):
|
||||||
choices.append((line, line))
|
choices.append((line, line))
|
||||||
instanceargs['choices'] = choices
|
instanceargs['choices'] = choices
|
||||||
elif field.data_type == 'boolean':
|
elif field.data_type == 'boolean':
|
||||||
|
Loading…
Reference in New Issue
Block a user