[UPDT] HELPDESK : Form design issue for settings page

This commit is contained in:
Horilla
2024-05-15 14:34:06 +05:30
parent 9d9b483e2d
commit 119208d359
2 changed files with 8 additions and 8 deletions

View File

@@ -48,6 +48,14 @@ class TicketTypeForm(ModelForm):
fields = "__all__" fields = "__all__"
exclude = ["is_active"] 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 FAQForm(ModelForm):
class Meta: class Meta:

View File

@@ -451,14 +451,6 @@
> >
{% csrf_token %} {% csrf_token %}
{{create_tag_f.as_p}} {{create_tag_f.as_p}}
<div class="d-flex flex-row-reverse mt-2">
<button
type="submit"
class="oh-btn oh-btn--secondary mt-2 mr-0 oh-btn--w-100-resp"
>
{% trans "Save" %}
</button>
</div>
</form> </form>
</div> </div>
</div> </div>