From bb22cadc8f1aae8bede523a6201d3d7ffe5ac06f Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Wed, 13 Nov 2024 09:14:39 +0100 Subject: [PATCH] Move FormCheckBox next to CheckBox --- python/nav/web/crispyforms.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/python/nav/web/crispyforms.py b/python/nav/web/crispyforms.py index eb69d5f96d..c7ceb8999d 100644 --- a/python/nav/web/crispyforms.py +++ b/python/nav/web/crispyforms.py @@ -33,6 +33,17 @@ class CheckBox(Field): template = 'custom_crispy_templates/horizontal_checkbox.html' +class FormCheckBox: + """Checkbox suited for the NAV layout + + :param field: A field to render as a checkbox field. + """ + + def __init__(self, field): + self.field = field + self.input_type = 'checkbox' + + class HelpField(Field): """Field that displays an icon with tooltip as helptext""" @@ -195,14 +206,3 @@ class and template definitions. form_id=form_id, form_class=form_class, ) - - -class FormCheckBox: - """Checkbox suited for the NAV layout - - :param field: A field to render as a checkbox field. - """ - - def __init__(self, field): - self.field = field - self.input_type = 'checkbox'