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 @@