diff --git a/python/nav/web/radius/forms.py b/python/nav/web/radius/forms.py index a6eb3c9e34..294c6b870c 100644 --- a/python/nav/web/radius/forms.py +++ b/python/nav/web/radius/forms.py @@ -20,8 +20,6 @@ from django.core.validators import validate_ipv4_address from django.core.validators import validate_integer as django_validate_integer -from crispy_forms.helper import FormHelper -from crispy_forms_foundation.layout import Layout, Submit from nav.web.crispyforms import ( set_flat_form_attributes, FormColumn, @@ -255,9 +253,8 @@ class AccountChartsForm(forms.Form): def __init__(self, *args, **kwargs): super(AccountChartsForm, self).__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.form_action = '' - self.helper.form_method = 'GET' - self.helper.layout = Layout( - 'days', 'charts', Submit('send', 'Show me', css_class='small') + self.attrs = set_flat_form_attributes( + form_method='get', + form_fields=[self['days'], self['charts']], + submit_field=SubmitField('send', 'Show me', css_classes='small'), ) diff --git a/python/nav/web/templates/radius/account_charts.html b/python/nav/web/templates/radius/account_charts.html index 8665b5cd43..1780dbaf1c 100644 --- a/python/nav/web/templates/radius/account_charts.html +++ b/python/nav/web/templates/radius/account_charts.html @@ -1,5 +1,4 @@ {% extends "radius/base.html" %} -{% load crispy_forms_tags %} {% load radius %} {% block content %} @@ -16,7 +15,7 @@