Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
26
core/modules/system/templates/form-element-label.html.twig
Normal file
26
core/modules/system/templates/form-element-label.html.twig
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @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 ? 'form-required',
|
||||
]
|
||||
%}
|
||||
{% if title is not empty or required -%}
|
||||
<label{{ attributes.addClass(classes) }}>{{ title }}</label>
|
||||
{%- endif %}
|
||||
Reference in a new issue