Skip to content

Commit

Permalink
Remove LabelSubmit
Browse files Browse the repository at this point in the history
This has been replaced by SubmitField setting has_empty_label to True
  • Loading branch information
johannaengland committed Oct 8, 2024
1 parent 2093397 commit ddba526
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
6 changes: 0 additions & 6 deletions python/nav/web/crispyforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ class NavSubmit(BaseInput):
field_classes = 'button small'


class LabelSubmit(Submit):
"""Submitbutton with a label above it to align within a row"""

template = 'custom_crispy_templates/submit.html'


class CheckBox(Field):
"""Checkbox suited for the NAV layout"""

Expand Down
3 changes: 0 additions & 3 deletions python/nav/web/sortedstats/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@

from django import forms

from crispy_forms_foundation.layout import Layout, Fieldset, Row, Column

from nav.web.crispyforms import (
FlatFieldset,
FormColumn,
FormRow,
LabelSubmit,
SubmitField,
set_flat_form_attributes,
)
Expand Down
2 changes: 0 additions & 2 deletions python/nav/web/templates/custom_crispy_templates/submit.html

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{# NB! This field can be used as a replacement of crispy's Submit and our custom LabelSubmit #}
{# NB! This field can be used as a replacement of crispy's Submit #}
{% if input.has_empty_label %}
<label>&nbsp;</label>
{% endif %}
Expand Down

0 comments on commit ddba526

Please sign in to comment.