annotate core/themes/stable/templates/form/datetime-wrapper.html.twig @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 {#
Chris@0 2 /**
Chris@0 3 * @file
Chris@0 4 * Theme override of a datetime form wrapper.
Chris@0 5 *
Chris@0 6 * Available variables:
Chris@0 7 * - content: The form element to be output, usually a datelist, or datetime.
Chris@0 8 * - title: The title of the form element.
Chris@0 9 * - title_attributes: HTML attributes for the title wrapper.
Chris@0 10 * - description: Description text for the form element.
Chris@0 11 * - required: An indicator for whether the associated form element is required.
Chris@0 12 *
Chris@0 13 * @see template_preprocess_datetime_wrapper()
Chris@0 14 */
Chris@0 15 #}
Chris@0 16 {%
Chris@0 17 set title_classes = [
Chris@0 18 required ? 'js-form-required',
Chris@0 19 required ? 'form-required',
Chris@0 20 ]
Chris@0 21 %}
Chris@0 22 {% if title %}
Chris@0 23 <h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
Chris@0 24 {% endif %}
Chris@0 25 {{ content }}
Chris@0 26 {% if errors %}
Chris@0 27 <div>
Chris@0 28 {{ errors }}
Chris@0 29 </div>
Chris@0 30 {% endif %}
Chris@0 31 {{ description }}