Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix checkbox helper text

dominik-zeglen63eb799a8b33
diff --git a/templates/materializecssform/field.html b/templates/materializecssform/field.html
index 66ae5ee554..72ab36975c 100644
--- a/templates/materializecssform/field.html
+++ b/templates/materializecssform/field.html
@@ -5,22 +5,22 @@
{% if field|is_checkbox %}
<div class="input input-field col {{ classes.label }}">
<div class="{{ classes.single_value }}">
- <p>
+ <div>
{% if field.auto_id %}
<input id="{{ field.auto_id }}" name="{{ field.html_name }}" class="filled-in" type="checkbox"{% if field.value %} checked="checked" {% endif %} {% if field.field.widget.attrs.disabled %} disabled {% endif %}>
<label for="{{ field.auto_id }}">
{{ field.label }}
+ {% for error in field.errors %}
+ <p class="help-block materialize-red-text">{{ error }}</p>
+ {% endfor %}
+ {% if field.help_text %}
+ <p class="help-block">
+ {{ field.help_text|safe }}
+ </p>
+ {% endif %}
</label>
{% endif %}
- {% for error in field.errors %}
- <p class="help-block materialize-red-text">{{ error }}</p>
- {% endfor %}
- {% if field.help_text %}
- <p class="help-block">
- {{ field.help_text|safe }}
- </p>
- {% endif %}
- </p>
+ </div>
</div>
</div>
{% elif field|is_checkbox_select_multiple %}