Merge branch 'fix-nested-labels'

This commit is contained in:
Chris Hill-Scott
2017-02-14 11:55:46 +00:00
5 changed files with 8 additions and 8 deletions

View File

@@ -9,7 +9,7 @@
) %}
<label class="{% if block %}block-label{% endif %}" for="{{ field.name }}">
{{ field()}}
{{ field.label }}
{{ field.label.text }}
{% if hint %}
<span class="form-hint">
{{ hint }}
@@ -26,4 +26,4 @@
</p>
{% endif %}
</label>
{% endmacro %}
{% endmacro %}

View File

@@ -1,7 +1,7 @@
{% macro file_upload(field, button_text="Choose file", alternate_link=None, alternate_link_text=None) %}
<form method="post" enctype="multipart/form-data" class="{% if field.errors %}error{% endif %}" data-module="file-upload">
<label class="file-upload-label" for="{{ field.name }}">
<span class="visually-hidden">{{ field.label }}</span>
<span class="visually-hidden">{{ field.label.text }}</span>
{% if hint %}
<span class="form-hint">
{{ hint }}

View File

@@ -11,7 +11,7 @@
<fieldset class="form-group{% if field.errors %} error{% endif %}" id="{{ field.name }}">
<legend>
<span class="form-label">
{{ field.label }}
{{ field.label.text }}
{% if hint %}
<span class="form-hint">
{{ hint }}

View File

@@ -7,7 +7,7 @@
<div class="form-group {% if field.errors %} error{% endif %}">
<fieldset>
<legend class="form-label">
{{ field.label }}
{{ field.label.text }}
{% if field.errors %}
<span class="error-message">
{{ field.errors[0] }}
@@ -46,7 +46,7 @@
<div class="{{ wrapping_class }} {% if field.errors %} error{% endif %}">
<fieldset>
<legend class="form-label">
{{ field.label }}
{{ field.label.text }}
{% if field.errors %}
<span class="error-message">
{{ field.errors[0] }}
@@ -80,7 +80,7 @@
<div class="form-group {% if field.errors %} error{% endif %}">
<fieldset>
<legend class="form-label">
{{ field.label }}
{{ field.label.text }}
{% if field.errors %}
<span class="error-message">
{{ field.errors[0] }}

View File

@@ -16,7 +16,7 @@
{% if label %}
{{ label }}
{% else %}
{{ field.label }}
{{ field.label.text }}
{% endif %}
{% if hint %}
<span class="form-hint">