From 119208d35925f192f5ec0eef69cb3964bdecccad Mon Sep 17 00:00:00 2001 From: Horilla Date: Wed, 15 May 2024 14:34:06 +0530 Subject: [PATCH] [UPDT] HELPDESK : Form design issue for settings page --- helpdesk/forms.py | 8 ++++++++ helpdesk/templates/helpdesk/ticket/ticket_detail.html | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) 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}} -
- -