diff --git a/helpdesk/forms.py b/helpdesk/forms.py index cf55cf7bc..eb5052da4 100644 --- a/helpdesk/forms.py +++ b/helpdesk/forms.py @@ -48,6 +48,14 @@ class TicketTypeForm(ModelForm): fields = "__all__" exclude = ["is_active"] + def as_p(self, *args, **kwargs): + """ + Render the form fields as HTML table rows with Bootstrap styling. + """ + context = {"form": self} + table_html = render_to_string("attendance_form.html", context) + return table_html + class FAQForm(ModelForm): class Meta: diff --git a/helpdesk/templates/helpdesk/ticket/ticket_detail.html b/helpdesk/templates/helpdesk/ticket/ticket_detail.html index 4fec2eb0a..2381a47e2 100644 --- a/helpdesk/templates/helpdesk/ticket/ticket_detail.html +++ b/helpdesk/templates/helpdesk/ticket/ticket_detail.html @@ -451,14 +451,6 @@ > {% csrf_token %} {{create_tag_f.as_p}} -
- -