Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit afec2ac2 authored by escuriola's avatar escuriola
Browse files

OEL-1618: Event fields heading. Recover title_classes and change heading to h2.

parent 34e0c15e
No related branches found
No related tags found
1 merge request!144OEL-1618: Upgrade BCL to 0.23.0.
{#
/**
* @file
* Default template for a field.
* Template for event body field.
*/
#}
{%
......@@ -10,6 +10,13 @@
label_display == 'inline' ? 'd-flex',
]
%}
{%
set title_classes = [
'field__label',
label_display == 'visually_hidden' ? 'visually-hidden',
]
%}
{% if label_hidden %}
{% if multiple %}
<div{{ attributes.addClass(classes) }}>
......@@ -25,18 +32,12 @@
{% else %}
<div{{ attributes.addClass(classes) }}>
{%- set _label -%}
{{- label -}}
{%- if label_display == 'inline' -%}
<span class="me-1">:</span>
{%- endif -%}
{{- label -}}{%- if label_display == 'inline' -%}<span class="me-1">:</span>{%- endif -%}
{%- endset -%}
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
title: _label,
title_tag: 'h3',
attributes: create_attribute().addClass([
'field__label',
label_display == 'visually_hidden' ? 'visually-hidden',
])
title_tag: 'h2',
attributes: create_attribute().addClass(title_classes)
} only %}
{% if multiple %}
<div class="field__items">
......
{#
/**
* @file
* Default template for a field.
* Template for event documents field.
*/
#}
{%
......@@ -10,6 +10,13 @@
label_display == 'inline' ? 'd-flex',
]
%}
{%
set title_classes = [
'field__label',
label_display == 'visually_hidden' ? 'visually-hidden',
]
%}
{% if label_hidden %}
{% if multiple %}
<div{{ attributes.addClass(classes) }}>
......@@ -25,18 +32,12 @@
{% else %}
<div{{ attributes.addClass(classes) }}>
{%- set _label -%}
{{- label -}}
{%- if label_display == 'inline' -%}
<span class="me-1">:</span>
{%- endif -%}
{{- label -}}{%- if label_display == 'inline' -%}<span class="me-1">:</span>{%- endif -%}
{%- endset -%}
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
title: _label,
title_tag: 'h3',
attributes: create_attribute().addClass([
'field__label',
label_display == 'visually_hidden' ? 'visually-hidden',
])
title_tag: 'h2',
attributes: create_attribute().addClass(title_classes)
} only %}
{% if multiple %}
<div class="field__items">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment