Skip to content

Commit

Permalink
form_field.html: moved helptext to above input field
Browse files Browse the repository at this point in the history
  • Loading branch information
vellip authored and hom3mad3 committed Sep 30, 2024
1 parent 3f86da1 commit 97490d8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
{% block after_label %}{% endblock after_label %}
</label>

{% block field %}
<div class="widget widget--{{ field|widget_type }}">
{{ field|add_error_attr:"aria-invalid:true" }}
</div>
{% endblock field %}

{% if field.help_text and not field.name == "password" %}
<span class="formgroup__help">
{{ field.help_text }}
</span>
{% endif %}

{% block field %}
<div class="widget widget--{{ field|widget_type }}">
{{ field|add_error_attr:"aria-invalid:true" }}
</div>
{% endblock field %}

{% if field.errors %}
<ul class="errorlist" aria-live="assertive" aria-atomic="true">
{% for error in field.errors %}
Expand Down
7 changes: 6 additions & 1 deletion meinberlin/assets/scss/styles_user_facing/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ button {

.formgroup__help {
font-size: 14px;
}

label + & {
margin-top: -0.4em;
margin-bottom: 0.4em;
}
}

0 comments on commit 97490d8

Please sign in to comment.