[FIX] ATTENDANCE: Grace time and breake point form style issue fixes in settings page
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user