datetime-wrapper.html.twig 746 Bytes
Newer Older
1
2
3
4
5
6
7
8
{#
/**
 * @file
 * Default theme implementation of a datetime form wrapper.
 *
 * Available variables:
 * - content: The form element to be output, usually a datelist, or datetime.
 * - title: The title of the form element.
9
 * - title_attributes: HTML attributes for the title wrapper.
10
 * - description: Description text for the form element.
11
 * - required: An indicator for whether the associated form element is required.
12
13
14
15
16
17
 *
 * @see template_preprocess_datetime_wrapper()
 *
 * @ingroup themeable
 */
#}
18
19
20
21
22
{%
  set title_classes = [
    required ? 'form-required',
  ]
%}
23
{% if title %}
24
  <h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
25
26
27
{% endif %}
{{ content }}
{% if description %}
28
  <div>{{ description }}</div>
29
{% endif %}