[UPDT] HELPDESK : Form design issue for settings page
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user