diff --git a/base/forms.py b/base/forms.py index c1fd56c26..c8605ecee 100644 --- a/base/forms.py +++ b/base/forms.py @@ -1605,6 +1605,14 @@ class TagsForm(ModelForm): widgets = {"color": TextInput(attrs={"type": "color", "style": "height:50px"})} exclude = ["objects", "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 EmployeeTagForm(ModelForm): """ diff --git a/base/templates/base/tags/helpdesk_tags.html b/base/templates/base/tags/helpdesk_tags.html index b4f7905ce..65d92ee16 100644 --- a/base/templates/base/tags/helpdesk_tags.html +++ b/base/templates/base/tags/helpdesk_tags.html @@ -66,7 +66,7 @@

- {% trans "Helpdesk Tag Update" %} + {% trans "Update Helpdesk Tag" %}

-
diff --git a/base/templates/base/ticket_type/ticket_type_form.html b/base/templates/base/ticket_type/ticket_type_form.html index 521cf5d2f..1981db26d 100644 --- a/base/templates/base/ticket_type/ticket_type_form.html +++ b/base/templates/base/ticket_type/ticket_type_form.html @@ -11,10 +11,4 @@ {% csrf_token %} {{form.non_field_errors}} {{form.as_p}} -
- -
-