mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 01:13:31 +01:00
Can now hide custom fields using query param in public ticket form
This commit is contained in:
parent
fbae218281
commit
38cedca541
@ -349,8 +349,11 @@ class PublicTicketForm(AbstractTicketForm):
|
||||
'priority': 'HELPDESK_PUBLIC_TICKET_PRIORITY',
|
||||
'due_date': 'HELPDESK_PUBLIC_TICKET_DUE_DATE',
|
||||
}
|
||||
for cf in CustomField.objects.filter(staff_only=False):
|
||||
field_hide_table["custom_%s" % cf.name] = None
|
||||
|
||||
for (field, setting) in field_hide_table.items():
|
||||
if hasattr(settings, setting) or field in hidden_fields:
|
||||
if (setting and hasattr(settings, setting)) or field in hidden_fields:
|
||||
self.fields[field].widget = forms.HiddenInput()
|
||||
|
||||
self.fields['queue'].choices = [('', '--------')] + [
|
||||
|
Loading…
Reference in New Issue
Block a user