Issue #2301599 by Cottser, mparker17: Fixed Regression: Bartik's field--taxonomy-term-reference.html.twig doesn't properly output label attributes.

8.0.x
webchick 2014-07-11 22:47:59 -07:00
parent 883577b673
commit 783db6db0a
2 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@ function bartik_menu_tree__shortcut_default($variables) {
function bartik_preprocess_field(&$variables) {
$element = $variables['element'];
if ($element['#field_type'] == 'taxonomy_term_reference') {
$variables['title_attributes']['class'][] = array('field-label');
$variables['title_attributes']['class'][] = 'field-label';
if ($variables['element']['#label_display'] == 'inline') {
$variables['title_attributes']['class'][] = 'inline';
}

View File

@ -6,7 +6,7 @@
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether the field label has been set to hidden.
* - label_attributes: HTML attributes for the label.
* - title_attributes: HTML attributes for the label.
* - label: The label for the field.
* - content_attributes: HTML attributes for the content.
* - items: List of all the field items.
@ -18,7 +18,7 @@
#}
<div class="{{ attributes.class }} clearfix"{{ attributes|without('class') }}>
{% if not label_hidden %}
<h3{{ label_attributes }}>{{ label }}: </h3>
<h3{{ title_attributes }}>{{ label }}: </h3>
{% endif %}
<ul class="links">
{% for delta, item in items %}