[FIX] ATTENDANCE: Grace time and breake point form style issue fixes in settings page

This commit is contained in:
Horilla
2024-05-15 14:35:18 +05:30
parent e4e93d08a0
commit 606edb25f4
2 changed files with 8 additions and 5 deletions

View File

@@ -827,6 +827,14 @@ class GraceTimeForm(ModelForm):
exclude = ["objects", "allowed_time_in_secs", "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 AttendanceRequestCommentForm(ModelForm):
"""

View File

@@ -45,11 +45,6 @@
hx-encoding="multipart/form-data">
{% csrf_token %}
{{form.as_p}}
<div class="d-flex flex-row-reverse mt-3">
<button type="submit" class="oh-btn oh-btn--secondary mt-2 mr-0 pl-4 pr-5 oh-btn--w-100-resp">
{% trans "Save" %}
</button>
</div>
</form>
</div>
</div>