Issue #2301599 by Cottser, mparker17: Fixed Regression: Bartik's field--taxonomy-term-reference.html.twig doesn't properly output label attributes.
parent
883577b673
commit
783db6db0a
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue