Mercurial > hg > isophonics-drupal-site
annotate core/modules/system/templates/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 * Default theme implementation 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 * @ingroup themeable |
Chris@0 | 16 */ |
Chris@0 | 17 #} |
Chris@0 | 18 {% |
Chris@0 | 19 set title_classes = [ |
Chris@0 | 20 required ? 'js-form-required', |
Chris@0 | 21 required ? 'form-required', |
Chris@0 | 22 ] |
Chris@0 | 23 %} |
Chris@0 | 24 {% if title %} |
Chris@0 | 25 <h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4> |
Chris@0 | 26 {% endif %} |
Chris@0 | 27 {{ content }} |
Chris@0 | 28 {% if errors %} |
Chris@0 | 29 <div> |
Chris@0 | 30 {{ errors }} |
Chris@0 | 31 </div> |
Chris@0 | 32 {% endif %} |
Chris@0 | 33 {% if description %} |
Chris@0 | 34 <div{{ description_attributes }}> |
Chris@0 | 35 {{ description }} |
Chris@0 | 36 </div> |
Chris@0 | 37 {% endif %} |