From 0d31c5480fe42dbb188169e7869bf39e982ca75a Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Thu, 3 Oct 2024 21:17:03 +0200 Subject: [PATCH 1/2] Uncrispify FilterForm --- python/nav/web/alertprofiles/forms.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/python/nav/web/alertprofiles/forms.py b/python/nav/web/alertprofiles/forms.py index 723dd46855..da7ef6813e 100644 --- a/python/nav/web/alertprofiles/forms.py +++ b/python/nav/web/alertprofiles/forms.py @@ -439,14 +439,21 @@ def __init__(self, *args, **kwargs): for field in self.fields.values(): field.widget.attrs['disabled'] = 'disabled' - self.helper = FormHelper() - self.helper.form_tag = False - self.helper.layout = Layout( - 'id', - Row( - Column('name', css_class='medium-6'), - Column('owner', css_class='medium-6'), - ), + self.attrs = set_flat_form_attributes( + form_fields=[ + FormRow( + fields=[ + FormColumn( + fields=[self['name']], + css_classes='medium-6', + ), + FormColumn( + fields=[self['owner']], + css_classes='medium-6', + ), + ] + ), + ] ) From 414138c44fef6bcb8c78fdb9d2feb4aa20e94c1a Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Fri, 4 Oct 2024 13:29:27 +0200 Subject: [PATCH 2/2] fixup! Uncrispify FilterForm --- python/nav/web/alertprofiles/forms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/nav/web/alertprofiles/forms.py b/python/nav/web/alertprofiles/forms.py index da7ef6813e..7bb04fe338 100644 --- a/python/nav/web/alertprofiles/forms.py +++ b/python/nav/web/alertprofiles/forms.py @@ -441,6 +441,7 @@ def __init__(self, *args, **kwargs): self.attrs = set_flat_form_attributes( form_fields=[ + self['id'], FormRow( fields=[ FormColumn(