From 5fde407ae004b35b9e8270b41de5383d1f2a5333 Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Thu, 7 Nov 2024 10:08:59 +0100 Subject: [PATCH] Uncrispify ManualDetentionTargetForm --- python/nav/web/arnold/forms.py | 8 ++++---- python/nav/web/templates/arnold/manualdetain.html | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/python/nav/web/arnold/forms.py b/python/nav/web/arnold/forms.py index fe9de939d7..88c06df10e 100644 --- a/python/nav/web/arnold/forms.py +++ b/python/nav/web/arnold/forms.py @@ -240,10 +240,10 @@ class ManualDetentionTargetForm(forms.Form): def __init__(self, *args, **kwargs): super(ManualDetentionTargetForm, self).__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.form_action = 'arnold-manual-detention' - self.helper.layout = Layout( - 'target', Submit('submit', 'Find', css_class='small') + self.attrs = set_flat_form_attributes( + form_action='arnold-manual-detention', + form_fields=[self['target']], + submit_field=SubmitField(value='Find', css_classes='small'), ) def clean_target(self): diff --git a/python/nav/web/templates/arnold/manualdetain.html b/python/nav/web/templates/arnold/manualdetain.html index f1deaaf5dc..8612654555 100644 --- a/python/nav/web/templates/arnold/manualdetain.html +++ b/python/nav/web/templates/arnold/manualdetain.html @@ -1,5 +1,4 @@ {% extends 'arnold/base.html' %} -{% load crispy_forms_tags %} {% block content %} @@ -13,7 +12,7 @@

Manual detention

- {% crispy form %} + {% include 'custom_crispy_templates/flat_form.html' %}