Security update to Drupal 8.4.6
[yaffs-website] / web / core / modules / system / templates / details.html.twig
1 {#
2 /**
3  * @file
4  * Default theme implementation for a details element.
5  *
6  * Available variables
7  * - attributes: A list of HTML attributes for the details element.
8  * - errors: (optional) Any errors for this details element, may not be set.
9  * - title: (optional) The title of the element, may not be set.
10  * - description: (optional) The description of the element, may not be set.
11  * - children: (optional) The children of the element, may not be set.
12  * - value: (optional) The value of the element, may not be set.
13  *
14  * @see template_preprocess_details()
15  *
16  * @ingroup themeable
17  */
18 #}
19 <details{{ attributes }}>
20   {%
21     set summary_classes = [
22       required ? 'js-form-required',
23       required ? 'form-required',
24     ]
25   %}
26   {%- if title -%}
27     <summary{{ summary_attributes.addClass(summary_classes) }}>{{ title }}</summary>
28   {%- endif -%}
29
30   {% if errors %}
31     <div>
32       {{ errors }}
33     </div>
34   {% endif %}
35
36   {{ description }}
37   {{ children }}
38   {{ value }}
39 </details>