Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
15
core/themes/stable/templates/form/checkboxes.html.twig
Normal file
15
core/themes/stable/templates/form/checkboxes.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a 'checkboxes' #type form element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the wrapper element.
|
||||
* - children: The rendered checkboxes.
|
||||
*
|
||||
* @see template_preprocess_checkboxes()
|
||||
*/
|
||||
@todo: remove this file once https://www.drupal.org/node/1819284 is resolved.
|
||||
This is identical to core/modules/system/templates/container.html.twig
|
||||
#}
|
||||
<div{{ attributes.addClass('form-checkboxes') }}>{{ children }}</div>
|
13
core/themes/stable/templates/form/confirm-form.html.twig
Normal file
13
core/themes/stable/templates/form/confirm-form.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for confirm form.
|
||||
*
|
||||
* By default this does not alter the appearance of a form at all,
|
||||
* but is provided as a convenience for themers.
|
||||
*
|
||||
* Available variables:
|
||||
* - form: The confirm form.
|
||||
*/
|
||||
#}
|
||||
{{ form }}
|
26
core/themes/stable/templates/form/container.html.twig
Normal file
26
core/themes/stable/templates/form/container.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override of a container used to wrap child elements.
|
||||
*
|
||||
* Used for grouped form items. Can also be used as a theme wrapper for any
|
||||
* renderable element, to surround it with a <div> and HTML attributes.
|
||||
* See the @link forms_api_reference.html Form API reference @endlink for more
|
||||
* information on the #theme_wrappers render array property.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
* - children: The rendered child elements of the container.
|
||||
* - has_parent: A flag to indicate that the container has one or more parent
|
||||
containers.
|
||||
*
|
||||
* @see template_preprocess_container()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
has_parent ? 'js-form-wrapper',
|
||||
has_parent ? 'form-wrapper',
|
||||
]
|
||||
%}
|
||||
<div{{ attributes.addClass(classes) }}>{{ children }}</div>
|
15
core/themes/stable/templates/form/datetime-form.html.twig
Normal file
15
core/themes/stable/templates/form/datetime-form.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override of a datetime form element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the datetime form element.
|
||||
* - content: The datelist form element to be output.
|
||||
*
|
||||
* @see template_preprocess_datetime_form()
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes }}>
|
||||
{{ content }}
|
||||
</div>
|
31
core/themes/stable/templates/form/datetime-wrapper.html.twig
Normal file
31
core/themes/stable/templates/form/datetime-wrapper.html.twig
Normal file
|
@ -0,0 +1,31 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override of a datetime form wrapper.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The form element to be output, usually a datelist, or datetime.
|
||||
* - title: The title of the form element.
|
||||
* - title_attributes: HTML attributes for the title wrapper.
|
||||
* - description: Description text for the form element.
|
||||
* - required: An indicator for whether the associated form element is required.
|
||||
*
|
||||
* @see template_preprocess_datetime_wrapper()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set title_classes = [
|
||||
required ? 'js-form-required',
|
||||
required ? 'form-required',
|
||||
]
|
||||
%}
|
||||
{% if title %}
|
||||
<h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
{% if errors %}
|
||||
<div>
|
||||
{{ errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ description }}
|
31
core/themes/stable/templates/form/details.html.twig
Normal file
31
core/themes/stable/templates/form/details.html.twig
Normal file
|
@ -0,0 +1,31 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a details element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the details element.
|
||||
* - errors: (optional) Any errors for this details element, may not be set.
|
||||
* - title: (optional) The title of the element, may not be set.
|
||||
* - description: (optional) The description of the element, may not be set.
|
||||
* - children: (optional) The children of the element, may not be set.
|
||||
* - value: (optional) The value of the element, may not be set.
|
||||
*
|
||||
* @see template_preprocess_details()
|
||||
*/
|
||||
#}
|
||||
<details{{ attributes }}>
|
||||
{%- if title -%}
|
||||
<summary{{ summary_attributes }}>{{ title }}</summary>
|
||||
{%- endif -%}
|
||||
|
||||
{% if errors %}
|
||||
<div>
|
||||
{{ errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ description }}
|
||||
{{ children }}
|
||||
{{ value }}
|
||||
</details>
|
|
@ -0,0 +1,21 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a dropbutton wrapper.
|
||||
*
|
||||
* Available variables:
|
||||
* - children: Contains the child elements of the dropbutton menu.
|
||||
*
|
||||
* @see template_preprocess()
|
||||
* @see template_preprocess_dropbutton_wrapper()
|
||||
*/
|
||||
#}
|
||||
{% if children %}
|
||||
{% spaceless %}
|
||||
<div class="dropbutton-wrapper">
|
||||
<div class="dropbutton-widget">
|
||||
{{ children }}
|
||||
</div>
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
{% endif %}
|
|
@ -0,0 +1,36 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for an individual form element.
|
||||
*
|
||||
* Available variables for all fields:
|
||||
* - multiple: Whether there are multiple instances of the field.
|
||||
*
|
||||
* Available variables for single cardinality fields:
|
||||
* - elements: Form elements to be rendered.
|
||||
*
|
||||
* Available variables when there are multiple fields.
|
||||
* - table: Table of field items.
|
||||
* - description: The description element containing the following properties:
|
||||
* - content: The description content of the form element.
|
||||
* - attributes: HTML attributes to apply to the description container.
|
||||
* - button: "Add another item" button.
|
||||
*
|
||||
* @see template_preprocess_field_multiple_value_form()
|
||||
*/
|
||||
#}
|
||||
{% if multiple %}
|
||||
<div class="js-form-item form-item">
|
||||
{{ table }}
|
||||
{% if description.content %}
|
||||
<div{{ description.attributes.addClass('description') }} >{{ description.content }}</div>
|
||||
{% endif %}
|
||||
{% if button %}
|
||||
<div class="clearfix">{{ button }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% for element in elements %}
|
||||
{{ element }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
60
core/themes/stable/templates/form/fieldset.html.twig
Normal file
60
core/themes/stable/templates/form/fieldset.html.twig
Normal file
|
@ -0,0 +1,60 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a fieldset element and its children.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the fieldset element.
|
||||
* - errors: (optional) Any errors for this fieldset element, may not be set.
|
||||
* - required: Boolean indicating whether the fieldeset element is required.
|
||||
* - legend: The legend element containing the following properties:
|
||||
* - title: Title of the fieldset, intended for use as the text of the legend.
|
||||
* - attributes: HTML attributes to apply to the legend.
|
||||
* - description: The description element containing the following properties:
|
||||
* - content: The description content of the fieldset.
|
||||
* - attributes: HTML attributes to apply to the description container.
|
||||
* - children: The rendered child elements of the fieldset.
|
||||
* - prefix: The content to add before the fieldset children.
|
||||
* - suffix: The content to add after the fieldset children.
|
||||
*
|
||||
* @see template_preprocess_fieldset()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'js-form-item',
|
||||
'form-item',
|
||||
'js-form-wrapper',
|
||||
'form-wrapper',
|
||||
]
|
||||
%}
|
||||
<fieldset{{ attributes.addClass(classes) }}>
|
||||
{%
|
||||
set legend_span_classes = [
|
||||
'fieldset-legend',
|
||||
required ? 'js-form-required',
|
||||
required ? 'form-required',
|
||||
]
|
||||
%}
|
||||
{# Always wrap fieldset legends in a SPAN for CSS positioning. #}
|
||||
<legend{{ legend.attributes }}>
|
||||
<span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
|
||||
</legend>
|
||||
<div class="fieldset-wrapper">
|
||||
{% if errors %}
|
||||
<div>
|
||||
{{ errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if prefix %}
|
||||
<span class="field-prefix">{{ prefix }}</span>
|
||||
{% endif %}
|
||||
{{ children }}
|
||||
{% if suffix %}
|
||||
<span class="field-suffix">{{ suffix }}</span>
|
||||
{% endif %}
|
||||
{% if description.content %}
|
||||
<div{{ description.attributes.addClass('description') }}>{{ description.content }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
|
@ -0,0 +1,25 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override 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()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
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 %}
|
94
core/themes/stable/templates/form/form-element.html.twig
Normal file
94
core/themes/stable/templates/form/form-element.html.twig
Normal file
|
@ -0,0 +1,94 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a form element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
* - errors: (optional) Any errors for this form element, may not be set.
|
||||
* - prefix: (optional) The form element prefix, may not be set.
|
||||
* - suffix: (optional) The form element suffix, may not be set.
|
||||
* - required: The required marker, or empty if the associated form element is
|
||||
* not required.
|
||||
* - type: The type of the element.
|
||||
* - name: The name of the element.
|
||||
* - label: A rendered label element.
|
||||
* - label_display: Label display setting. It can have these values:
|
||||
* - before: The label is output before the element. This is the default.
|
||||
* The label includes the #title and the required marker, if #required.
|
||||
* - after: The label is output after the element. For example, this is used
|
||||
* for radio and checkbox #type elements. If the #title is empty but the
|
||||
* field is #required, the label will contain only the required marker.
|
||||
* - invisible: Labels are critical for screen readers to enable them to
|
||||
* properly navigate through forms but can be visually distracting. This
|
||||
* property hides the label for everyone except screen readers.
|
||||
* - attribute: Set the title attribute on the element to create a tooltip but
|
||||
* output no label element. This is supported only for checkboxes and radios
|
||||
* in \Drupal\Core\Render\Element\CompositeFormElementTrait::preRenderCompositeFormElement().
|
||||
* It is used where a visual label is not needed, such as a table of
|
||||
* checkboxes where the row and column provide the context. The tooltip will
|
||||
* include the title and required marker.
|
||||
* - description: (optional) A list of description properties containing:
|
||||
* - content: A description of the form element, may not be set.
|
||||
* - attributes: (optional) A list of HTML attributes to apply to the
|
||||
* description content wrapper. Will only be set when description is set.
|
||||
* - description_display: Description display setting. It can have these values:
|
||||
* - before: The description is output before the element.
|
||||
* - after: The description is output after the element. This is the default
|
||||
* value.
|
||||
* - invisible: The description is output after the element, hidden visually
|
||||
* but available to screen readers.
|
||||
* - disabled: True if the element is disabled.
|
||||
* - title_display: Title display setting.
|
||||
*
|
||||
* @see template_preprocess_form_element()
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'js-form-item',
|
||||
'form-item',
|
||||
'js-form-type-' ~ type|clean_class,
|
||||
'form-item-' ~ name|clean_class,
|
||||
'js-form-item-' ~ name|clean_class,
|
||||
title_display not in ['after', 'before'] ? 'form-no-label',
|
||||
disabled == 'disabled' ? 'form-disabled',
|
||||
errors ? 'form-item--error',
|
||||
]
|
||||
%}
|
||||
{%
|
||||
set description_classes = [
|
||||
'description',
|
||||
description_display == 'invisible' ? 'visually-hidden',
|
||||
]
|
||||
%}
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
{% if label_display in ['before', 'invisible'] %}
|
||||
{{ label }}
|
||||
{% endif %}
|
||||
{% if prefix is not empty %}
|
||||
<span class="field-prefix">{{ prefix }}</span>
|
||||
{% endif %}
|
||||
{% if description_display == 'before' and description.content %}
|
||||
<div{{ description.attributes }}>
|
||||
{{ description.content }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ children }}
|
||||
{% if suffix is not empty %}
|
||||
<span class="field-suffix">{{ suffix }}</span>
|
||||
{% endif %}
|
||||
{% if label_display == 'after' %}
|
||||
{{ label }}
|
||||
{% endif %}
|
||||
{% if errors %}
|
||||
<div class="form-item--error-message">
|
||||
{{ errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if description_display in ['after', 'invisible'] and description.content %}
|
||||
<div{{ description.attributes.addClass(description_classes) }}>
|
||||
{{ description.content }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
15
core/themes/stable/templates/form/form.html.twig
Normal file
15
core/themes/stable/templates/form/form.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a 'form' element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the wrapper element.
|
||||
* - children: The child elements of the form.
|
||||
*
|
||||
* @see template_preprocess_form()
|
||||
*/
|
||||
#}
|
||||
<form{{ attributes }}>
|
||||
{{ children }}
|
||||
</form>
|
13
core/themes/stable/templates/form/input.html.twig
Normal file
13
core/themes/stable/templates/form/input.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for an 'input' #type form element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: A list of HTML attributes for the input element.
|
||||
* - children: Optional additional rendered elements.
|
||||
*
|
||||
* @see template_preprocess_input()
|
||||
*/
|
||||
#}
|
||||
<input{{ attributes }} />{{ children }}
|
13
core/themes/stable/templates/form/radios.html.twig
Normal file
13
core/themes/stable/templates/form/radios.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a 'radios' #type form element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the wrapper element.
|
||||
* - children: The rendered radios.
|
||||
*
|
||||
* @see template_preprocess_radios()
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes }}>{{ children }}</div>
|
27
core/themes/stable/templates/form/select.html.twig
Normal file
27
core/themes/stable/templates/form/select.html.twig
Normal file
|
@ -0,0 +1,27 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a select element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the select tag.
|
||||
* - options: The option element children.
|
||||
*
|
||||
* @see template_preprocess_select()
|
||||
*/
|
||||
#}
|
||||
{% spaceless %}
|
||||
<select{{ attributes }}>
|
||||
{% for option in options %}
|
||||
{% if option.type == 'optgroup' %}
|
||||
<optgroup label="{{ option.label }}">
|
||||
{% for sub_option in option.options %}
|
||||
<option value="{{ sub_option.value }}"{{ sub_option.selected ? ' selected="selected"' }}>{{ sub_option.label }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% elseif option.type == 'option' %}
|
||||
<option value="{{ option.value }}"{{ option.selected ? ' selected="selected"' }}>{{ option.label }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endspaceless %}
|
18
core/themes/stable/templates/form/textarea.html.twig
Normal file
18
core/themes/stable/templates/form/textarea.html.twig
Normal file
|
@ -0,0 +1,18 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Theme override for a 'textarea' #type form element.
|
||||
*
|
||||
* Available variables
|
||||
* - wrapper_attributes: A list of HTML attributes for the wrapper element.
|
||||
* - attributes: A list of HTML attributes for the textarea element.
|
||||
* - resizable: An indicator for whether the textarea is resizable.
|
||||
* - required: An indicator for whether the textarea is required.
|
||||
* - value: The textarea content.
|
||||
*
|
||||
* @see template_preprocess_textarea()
|
||||
*/
|
||||
#}
|
||||
<div{{ wrapper_attributes }}>
|
||||
<textarea{{ attributes }}>{{ value }}</textarea>
|
||||
</div>
|
Reference in a new issue