Skip to content

Commit

Permalink
Merge pull request #3209 from Uninett/cleanup/remove-unused-crispy-ch…
Browse files Browse the repository at this point in the history
…eckbox

Remove unused crispy `CheckBox`
  • Loading branch information
johannaengland authored Nov 19, 2024
2 parents 734e83d + a9c9596 commit 36fb12f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 3 additions & 3 deletions python/nav/web/arnold/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

from nav.util import is_valid_ip, is_valid_mac
from nav.web.crispyforms import (
CheckBox,
FlatFieldset,
FormCheckBox,
FormColumn,
FormDiv,
FormRow,
Expand Down Expand Up @@ -243,7 +243,7 @@ def __init__(self, *args, **kwargs):
fields=[self['keep_closed']], css_classes='medium-4'
),
FormColumn(
fields=[FormCheckBox(self['exponential'])],
fields=[CheckBox(self['exponential'])],
css_classes='medium-4',
),
FormDiv(css_classes='medium-4 columns'),
Expand All @@ -254,7 +254,7 @@ def __init__(self, *args, **kwargs):
],
css_class='secondary',
),
FormCheckBox(self['active']),
CheckBox(self['active']),
],
submit_field=SubmitField(value='Save'),
)
Expand Down
9 changes: 1 addition & 8 deletions python/nav/web/crispyforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
from typing import Optional

from django import forms
from crispy_forms_foundation.layout import Field


class CheckBox(Field):
"""Checkbox suited for the NAV layout"""

template = 'custom_crispy_templates/horizontal_checkbox.html'


class FormCheckBox:
class CheckBox:
"""Checkbox suited for the NAV layout
:param field: A field to render as a checkbox field.
Expand Down

0 comments on commit 36fb12f

Please sign in to comment.