reverted: --- b/core/themes/classy/templates/system/fieldset.html.twig +++ a/core/themes/classy/templates/system/fieldset.html.twig @@ -5,7 +5,6 @@ * * Available variables: * - attributes: HTML attributes for the fieldset element. - * - errors: (optional) Any errors for this fieldset element, may not be set. * - required: Boolean indicating whether the fieldeset element is required. * - legend: The legend element containing the following properties: * - title: Title of the fieldset, intended for use as the text of the legend. @@ -22,19 +21,7 @@ * @ingroup themeable */ #} + -{% - set classes = [ - 'form-item', - 'form-wrapper', - errors ? 'form-error', - ] -%} - - {% if errors %} -
- {{ errors }} -
- {% endif %} {% set legend_span_classes = [ 'fieldset-legend', reverted: --- b/core/themes/classy/templates/system/form-element.html.twig +++ a/core/themes/classy/templates/system/form-element.html.twig @@ -5,7 +5,6 @@ * * Available variables: * - attributes: HTML attributes for the containing element. - * - errors: (optional) Any errors for this form element, may not be set. * - prefix: (optional) The form element prefix, may not be set. * - suffix: (optional) The form element suffix, may not be set. * - required: The required marker, or empty if the associated form element is @@ -53,7 +52,6 @@ 'form-item-' ~ name|clean_class, title_display not in ['after', 'before'] ? 'form-no-label', disabled == 'disabled' ? 'form-disabled', - errors ? 'form-error', ] %} {% @@ -63,11 +61,6 @@ ] %} - {% if errors %} -
- {{ errors }} -
- {% endif %} {% if label_display in ['before', 'invisible'] %} {{ label }} {% endif %} only in patch2: unchanged: --- a/core/themes/classy/templates/form/fieldset.html.twig +++ b/core/themes/classy/templates/form/fieldset.html.twig @@ -5,6 +5,7 @@ * * Available variables: * - attributes: HTML attributes for the fieldset element. + * - errors: (optional) Any errors for this fieldset element, may not be set. * - required: Boolean indicating whether the fieldeset element is required. * - legend: The legend element containing the following properties: * - title: Title of the fieldset, intended for use as the text of the legend. @@ -21,7 +22,19 @@ * @ingroup themeable */ #} - +{% + set classes = [ + 'form-item', + 'form-wrapper', + errors ? 'form-error', + ] +%} + + {% if errors %} +
+ {{ errors }} +
+ {% endif %} {% set legend_span_classes = [ 'fieldset-legend', only in patch2: unchanged: --- a/core/themes/classy/templates/form/form-element.html.twig +++ b/core/themes/classy/templates/form/form-element.html.twig @@ -5,6 +5,7 @@ * * Available variables: * - attributes: HTML attributes for the containing element. + * - errors: (optional) Any errors for this form element, may not be set. * - prefix: (optional) The form element prefix, may not be set. * - suffix: (optional) The form element suffix, may not be set. * - required: The required marker, or empty if the associated form element is @@ -52,6 +53,7 @@ 'form-item-' ~ name|clean_class, title_display not in ['after', 'before'] ? 'form-no-label', disabled == 'disabled' ? 'form-disabled', + errors ? 'form-error', ] %} {% @@ -61,6 +63,11 @@ ] %} + {% if errors %} +
+ {{ errors }} +
+ {% endif %} {% if label_display in ['before', 'invisible'] %} {{ label }} {% endif %}