Skip to content

Commit

Permalink
Drop field list and only allow single field
Browse files Browse the repository at this point in the history
  • Loading branch information
podliashanyk committed Nov 14, 2024
1 parent fd88b5c commit 7cb665a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python/nav/web/seeddb/forms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def cut_branch(field, klass, pk):
# non-crispy helpers


def get_single_layout(heading, filter_fields: list):
def get_single_layout(heading, filter_field):
"""Get default layout for a single filter"""
return set_flat_form_attributes(
form_class="custom",
Expand All @@ -140,7 +140,7 @@ def get_single_layout(heading, filter_fields: list):
fields=[
FormRow(
fields=[
FormColumn(fields=filter_fields, css_classes="medium-8"),
FormColumn(fields=[filter_field], css_classes="medium-8"),
FormColumn(
fields=[
SubmitField(
Expand Down Expand Up @@ -294,7 +294,7 @@ class NetboxTypeFilterForm(forms.Form):
def __init__(self, *args, **kwargs):
super(NetboxTypeFilterForm, self).__init__(*args, **kwargs)
self.attrs = get_single_layout(
heading="Filter types", filter_fields=[self["vendor"]]
heading="Filter types", filter_field=self["vendor"]
)


Expand Down
2 changes: 1 addition & 1 deletion python/nav/web/seeddb/page/management_profile/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, *args, **kwargs):
super(ManagementProfileFilterForm, self).__init__(*args, **kwargs)

self.attrs = get_single_layout(
heading="Filter connection profiles", filter_fields=[self["protocol"]]
heading="Filter connection profiles", filter_field=self["protocol"]
)


Expand Down

0 comments on commit 7cb665a

Please sign in to comment.