diff --git a/python/nav/web/arnold/forms.py b/python/nav/web/arnold/forms.py index a8ca81775d..2622b4c46d 100644 --- a/python/nav/web/arnold/forms.py +++ b/python/nav/web/arnold/forms.py @@ -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, @@ -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'), @@ -254,7 +254,7 @@ def __init__(self, *args, **kwargs): ], css_class='secondary', ), - FormCheckBox(self['active']), + CheckBox(self['active']), ], submit_field=SubmitField(value='Save'), ) diff --git a/python/nav/web/crispyforms.py b/python/nav/web/crispyforms.py index a91e24cf6f..dcc6a36e1f 100644 --- a/python/nav/web/crispyforms.py +++ b/python/nav/web/crispyforms.py @@ -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.