Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Default theme implementation for a fieldset element and its children. Chris@0: * Chris@0: * Available variables: Chris@0: * - attributes: HTML attributes for the
element. Chris@0: * - errors: (optional) Any errors for this
element, may not be set. Chris@0: * - required: Boolean indicating whether the element is required. Chris@0: * - legend: The element containing the following properties: Chris@0: * - title: Title of the
, intended for use as the text Chris@0: of the . Chris@0: * - attributes: HTML attributes to apply to the element. Chris@0: * - description: The description element containing the following properties: Chris@0: * - content: The description content of the
. Chris@0: * - attributes: HTML attributes to apply to the description container. Chris@0: * - children: The rendered child elements of the
. Chris@0: * - prefix: The content to add before the
children. Chris@0: * - suffix: The content to add after the
children. Chris@0: * Chris@0: * @see template_preprocess_fieldset() Chris@0: * Chris@0: * @ingroup themeable Chris@0: */ Chris@0: #} Chris@0: {% Chris@0: set classes = [ Chris@0: 'js-form-item', Chris@0: 'form-item', Chris@0: 'js-form-wrapper', Chris@0: 'form-wrapper', Chris@0: ] Chris@0: %} Chris@0: Chris@0: {% Chris@0: set legend_span_classes = [ Chris@0: 'fieldset-legend', Chris@0: required ? 'js-form-required', Chris@0: required ? 'form-required', Chris@0: ] Chris@0: %} Chris@0: {# Always wrap fieldset legends in a for CSS positioning. #} Chris@0: Chris@0: {{ legend.title }} Chris@0: Chris@0:
Chris@0: {% if errors %} Chris@0:
Chris@0: {{ errors }} Chris@0:
Chris@0: {% endif %} Chris@0: {% if prefix %} Chris@0: {{ prefix }} Chris@0: {% endif %} Chris@0: {{ children }} Chris@0: {% if suffix %} Chris@0: {{ suffix }} Chris@0: {% endif %} Chris@0: {% if description.content %} Chris@0: {{ description.content }}
Chris@0: {% endif %} Chris@0: Chris@0: