Skip to content

Commit

Permalink
Merge pull request Uninett#3166 from Uninett/uncrispify/ManualDetenti…
Browse files Browse the repository at this point in the history
…onTargetForm

Uncrispify ManualDetentionTargetForm
  • Loading branch information
stveit authored Nov 8, 2024
2 parents eca2e0d + 5fde407 commit c28ae78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions python/nav/web/arnold/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions python/nav/web/templates/arnold/manualdetain.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends 'arnold/base.html' %}
{% load crispy_forms_tags %}

{% block content %}

Expand All @@ -13,7 +12,7 @@ <h4>Manual detention</h4>

<div class="row">
<div class="medium-4 column">
{% crispy form %}
{% include 'custom_crispy_templates/flat_form.html' %}
</div>
</div>

Expand Down

0 comments on commit c28ae78

Please sign in to comment.