Mercurial > hg > isophonics-drupal-site
view core/modules/system/templates/form-element-label.html.twig @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
{# /** * @file * Default theme implementation for a form element label. * * Available variables: * - title: The label's text. * - title_display: Elements title_display setting. * - required: An indicator for whether the associated form element is required. * - attributes: A list of HTML attributes for the label. * * @see template_preprocess_form_element_label() * * @ingroup themeable */ #} {% set classes = [ title_display == 'after' ? 'option', title_display == 'invisible' ? 'visually-hidden', required ? 'js-form-required', required ? 'form-required', ] %} {% if title is not empty or required -%} <label{{ attributes.addClass(classes) }}>{{ title }}</label> {%- endif %}