Move all files to 2017/

This commit is contained in:
Oliver Davies 2025-09-29 22:25:17 +01:00
parent ac7370f67f
commit 2875863330
15717 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{#
/**
* @file
* Default theme implementation of a webform actions.
*
* @see template_preprocess_webform_actions()
* @see \Drupal\webform\WebformSubmissionForm::actionsElement
* @see \Drupal\webform\WebformSubmissionForm::actions
*
* @ingroup themeable
*/
#}
{{ element }}

View file

@ -0,0 +1,25 @@
{#
/**
* @file
* Theme implementation for 'CodeMirror' code.
*
* Available variables
* - code: The code.
* - type: The type of code.
* - mode: The CodeMirror mode used to format the code.
*
* @see http://codemirror.net/doc/manual.html#option_mode
* @see \Drupal\webform\Element\WebformCodeMirror()
* @see template_preprocess_webform_codemirror()
*
* @ingroup themeable
*/
#}
{% if type == 'html' %}
{{ attach_library('webform/webform.element.codemirror.html') }}
{% elseif type == 'yaml' %}
{{ attach_library('webform/webform.element.codemirror.yaml') }}
{% else %}
{{ attach_library('webform/webform.element.codemirror.text') }}
{% endif %}
<pre class="js-webform-codemirror-runmode webform-codemirror-runmode" data-webform-codemirror-mode="{{ mode }}">{{ code }}</pre>

View file

@ -0,0 +1,50 @@
{#
/**
* @file
* Default theme implementation of an address composite webform element.
*
* Available variables:
* - content: The address webform element to be output.
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_composite_address()
*
* @ingroup themeable
*/
#}
{% if flexbox %}
{% if content.address %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.address }}</div></div>
</div>
{% endif %}
{% if content.address_2 %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.address_2 }}</div></div>
</div>
{% endif %}
<div class="webform-flexbox">
{% if content.city %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.city }}</div></div>
{% endif %}
{% if content.state_province %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.state_province }}</div></div>
{% endif %}
{% if content.postal_code %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.postal_code }}</div></div>
{% endif %}
</div>
{% if content.country %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.country }}</div></div>
</div>
{% endif %}
{% else %}
{{ content }}
{% endif %}

View file

@ -0,0 +1,72 @@
{#
/**
* @file
* Default theme implementation of a contact composite webform element.
*
* Available variables:
* - content: The contact webform element to be output.
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_composite_contact()
*
* @ingroup themeable
*/
#}
{% if flexbox %}
{% if content.name or content.company %}
<div class="webform-flexbox">
{% if content.name %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.name }}</div></div>
{% endif %}
{% if content.company %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.company }}</div></div>
{% endif %}
</div>
{% endif %}
{% if content.email or content.phone %}
<div class="webform-flexbox">
{% if content.email %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.email }}</div></div>
{% endif %}
{% if content.phone %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.phone }}</div></div>
{% endif %}
</div>
{% endif %}
{% if content.address %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.address }}</div></div>
</div>
{% endif %}
{% if content.address_2 %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.address_2 }}</div></div>
</div>
{% endif %}
<div class="webform-flexbox">
{% if content.city %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.city }}</div></div>
{% endif %}
{% if content.state_province %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.state_province }}</div></div>
{% endif %}
{% if content.postal_code %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.postal_code }}</div></div>
{% endif %}
</div>
{% if content.country %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.country }}</div></div>
</div>
{% endif %}
{% else %}
{{ content }}
{% endif %}

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation of a link composite webform element.
*
* Available variables:
* - content: The link webform element to be output.
* @see template_preprocess_webform_composite_link()
*
* @ingroup themeable
*/
#}
{{ content }}

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation of a location composite webform element.
*
* Available variables:
* - content: The location webform element to be output.
*
* @see template_preprocess_webform_composite_location()
*
* @ingroup themeable
*/
#}
{{ content }}

View file

@ -0,0 +1,39 @@
{#
/**
* @file
* Default theme implementation of a name composite webform element.
*
* Available variables:
* - content: The name webform element to be output.
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_composite_name()
*
* @ingroup themeable
*/
#}
{% if flexbox %}
<div class="webform-flexbox">
{% if content.title %}
<div class="webform-flex webform-flex--2"><div class="webform-flex--container">{{ content.title }}</div></div>
{% endif %}
{% if content.first %}
<div class="webform-flex webform-flex--3"><div class="webform-flex--container">{{ content.first }}</div></div>
{% endif %}
{% if content.middle %}
<div class="webform-flex webform-flex--2"><div class="webform-flex--container">{{ content.middle }}</div></div>
{% endif %}
{% if content.last %}
<div class="webform-flex webform-flex--3"><div class="webform-flex--container">{{ content.last }}</div></div>
{% endif %}
{% if content.suffix %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.suffix }}</div></div>
{% endif %}
{% if content.degree %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.degree }}</div></div>
{% endif %}
</div>
{% else %}
{{ content }}
{% endif %}

View file

@ -0,0 +1,18 @@
{#
/**
* @file
* Default theme implementation of a telephone composite webform element.
*
* Available variables:
* - content: The telephone webform element to be output.
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_composite_telephone()
*
* @ingroup themeable
*/
#}
{{ content.type }}
{{ content.phone }}
{{ content.ext }}

View file

@ -0,0 +1,34 @@
{#
/**
* @file
* Default theme implementation to webform confirmation.
*
* Available variables:
* - progress: Progress bar.
* - message: Confirmation message.
* - back_url: URL to the previous webform submission.
*
* @see template_preprocess_webform_confirmation()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.confirmation') }}
{% if progress %}
{{ progress }}
{% endif %}
<div{{ attributes.addClass('webform-confirmation') }}>
{% if message %}
<div class="webform-confirmation__message">{{ message }}</div>
{% endif %}
{% if back %}
<div class="webform-confirmation__back">
<a href="{{ back_url }}" rel="prev" title="{{ back_label }}"{{ back_attributes }}>{{ back_label }}</a>
</div>
{% endif %}
</div>

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation for a webform base container as html.
*
* Available variables:
* - element: The webform element.
* - title: The label for the container.
* - value: The content for the container.
* - options Associative array of options for element.
* - email: Flag to determine if element is for an email.
*/
#}
{{ value }}

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation for a webform base container as text.
*
* Available variables:
* - element: The form element.
* - title: The label for the container.
* - value: The content for the container.
* - options Associative array of options for element.
* - email: Flag to determine if element is for an email.
*/
#}
{{ value }}

View file

@ -0,0 +1,48 @@
{#
/**
* @file
* Default theme implementation for the webform contribute community info.
*
* Available variables:
* - account: The user or organization account profile.
* - membership: The user or organizations membership status.
* - contribution: The user or organizations contributions.
*/
#}
{{ attach_library('webform/webform.contribute') }}
<div class="webform-contribute-community-info">
<h2 class="webform-contribute-community-info__header">{{ 'Community Information'|t }}</h2>
<div class="webform-contribute-community-info__items">
<div class="webform-contribute-community-info__item">
<span class="webform-contribute-community-info__item-icon webform-contribute-community-info__item-icon--account" id="contribute-info-account"></span>
<div class="webform-contribute-community-info__item-details">
<h3 class="webform-contribute-community-info__item-title">{{ 'Drupal.org Account'|t }}</h3>
{{ account.value }}
{% if account.description %}
<br/>{{ account.description }}
{% endif %}
</div>
</div>
<div class="webform-contribute-community-info__item">
<span class="webform-contribute-community-info__item-icon webform-contribute-community-info__item-icon--membership" id="contribute-info-membership"></span>
<div class="webform-contribute-community-info__item-details">
<h3 class="webform-contribute-community-info__item-title">{{ 'Drupal Association Membership'|t }}</h3>
{{ membership.value }}
{% if membership.description %}
<br/>{{ membership.description }}
{% endif %}
</div>
</div>
<div class="webform-contribute-community-info__item">
<span class="webform-contribute-community-info__item-icon webform-contribute-community-info__item-icon--contribution" id="contribute-info-contribution"></span>
<div class="webform-contribute-community-info__item-details">
<h3 class="webform-contribute-community-info__item-title">{{ 'Contributions to Drupal'|t }}</h3>
{{ contribution.value }}
{% if contribution.description %}
<br/>{{ contribution.description }}
{% endif %}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,24 @@
{#
/**
* @file
* Default theme implementation for an audio file element.
*
* Available variables:
* - element: The element.
* - value: The element's value.
* - options Associative array of options for element.
* - file: The element's File object.
* - file_link: Link to the file.
*
* @see http://caniuse.com/#feat=audio
* @see http://www.w3schools.com/html/html5_audio.asp
*/
#}
{% if extension == 'mp3' %}
<div class="webform-audio-file">
<audio controls>
<source src="{{ uri }}" type="{{ type }}">
</audio>
</div>
{% endif %}
<div>{{ file_link }}</div>

View file

@ -0,0 +1,21 @@
{#
/**
* @file
* Default theme implementation for a webform base element as html.
*
* Available variables:
* - element: The element.
* - title: The label for the element.
* - value: The content for the element.
* - item: The form item used to display the element.
* - options Associative array of options for element.
* - multiline: Flag to determine if value spans multiple lines.
* - email: Flag to determine if element is for an email.
*/
#}
{% if options.email %}
{% if title %}<b>{{ title }}</b><br />{% endif %}{{ value }}<br /><br />
{% else %}
{{ item }}
{% endif %}

View file

@ -0,0 +1,23 @@
{#
/**
* @file
* Default theme implementation for a webform base element as text.
*
* Available variables:
* - element: The webform element.
* - title: The label for the element.
* - value: The content for the element.
* - options Associative array of options for element.
* - email: Flag to determine if element is for an email.
* - multiline: Flag to determine if value spans multiple lines.
* - first: Flag to determine if the element is that first element in its container.
* - last: Flag to determine if the element is that last element in its container.
*
* @see \Drupal\webform\WebformSubmissionViewBuilder::buildElements
*/
#}
{% if title %}{{ title }}{% if options.multiline %}:
{% else %}: {% endif %}{% endif %}{{ value }}
{% if options.multiline and not options.last %}
{% endif %}

View file

@ -0,0 +1,15 @@
{#
/**
* @file
* Default theme implementation for a document file element.
*
* Available variables:
* - element: The element.
* - value: The element's value.
* - options Associative array of options for element.
* - file: The element's File object.
* - file_link: Link to the file.
*/
#}
<div>{{ file_link }}</div>

View file

@ -0,0 +1,20 @@
{#
/**
* @file
* Theme implementation for webform element help
*
* Available variables
* - element: form element
* - help: Help content.
* - help_icon: Help icon.
*
* @see template_preprocess_webform_element_help()
*
* @ingroup themeable
*/
#}
{% spaceless %}
{{ attach_library('webform/webform.element.help') }}
<span{{ attributes }}><span aria-hidden="true">?</span></span>
{% endspaceless %}

View file

@ -0,0 +1,18 @@
{#
/**
* @file
* Default theme implementation for an image file element.
*
* Available variables:
* - element: The element.
* - value: The element's value.
* - options Associative array of options for element.
* - file: The element's File object.
* - uri: The element's URI.
* - style_name: The image style name.
* - format: The image display format.
* - image: The image.
*/
#}
{{ attach_library('webform/webform.element.image_file') }}
{{ image }}

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation for a managed file element.
*
* Available variables:
* - element: The element.
* - value: The element's value.
* - options Associative array of options for element.
* - file: The element's File object.
* - file_link: Link to the file.
*/
#}
<div>{{ file_link }}</div>

View file

@ -0,0 +1,28 @@
{#
/**
* @file
* Theme implementation for webform element more.
*
* Available variables
* - title: More label.
* - content: More content.
*
* Based on WAI-ARIA Authoring Practices 1.1: Disclosure (Show/Hide)
*
* @see https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
* @see https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html
* @see template_preprocess_webform_element_more()
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.more') }}
{%
set classes = [
'js-webform-element-more',
'webform-element-more',
]
%}
<div{{ attributes.addClass(classes) }}>
<div class="webform-element-more--link"><a role="button" href="#more">{{ more_title }}</a></div>
<div id="{{ attributes.id }}--content" class="webform-element-more--content">{{ more }}</div>
</div>

View file

@ -0,0 +1,25 @@
{#
/**
* @file
* Default theme implementation for a video file element.
*
* Available variables:
* - element: The element.
* - value: The element's value.
* - options Associative array of options for element.
* - file: The element's File object.
* - file_link: Link to the file.
*
* @see http://caniuse.com/#feat=video
* @see http://www.w3schools.com/html/html5_audio.asp
*/
#}
{% if extension == 'mp4' %}
{{ attach_library('webform/webform.element.video_file') }}
<div class="webform-video-file">
<video width="620" height="349" controls>
<source src="{{ uri }}" type="{{ type }}">
</video>
</div>
{% endif %}
<div>{{ file_link }}</div>

View file

@ -0,0 +1,16 @@
{#
/**
* @file
* Default theme implementation for webform email wrapper template as HTML.
*
* @ingroup themeable
*/
#}
<html>
<head>
<title>{{ subject }}</title>
</head>
<body>
{{ body|raw }}
</body>
</html>

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation for webform email wrapper template as HTML.
*
* Available variables:
* - message: The email message which contains to, from, subject, message, etc…
* - webform_submission: The webform submission.
* - handler: The webform handler.
*
* @ingroup themeable
*/
#}
{{ message.body }}

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation for webform email wrapper template as plain text.
*
* Available variables:
* - message: The email message which contains to, from, subject, message, etc…
* - webform_submission: The webform submission.
* - handler: The webform handler.
*
* @ingroup themeable
*/
#}
{{ message.body }}

View file

@ -0,0 +1,21 @@
{#
/**
* @file
* Default theme implementation for a summary of a webform action handler.
*
* Available variables:
* - settings: The current configuration for this debug handler.
* - handler: The action handler.
*
* @ingroup themeable
*/
#}
{% if settings.debug %}<b class="color-error">{{ 'Debugging is enabled'|t }}</b><br />{% endif %}
{% if settings.lock is not null %}<b>{{ 'Lock:'|t }}</b> {{ settings.lock ? 'Locked'|t : 'Unlocked'|t }}<br />{% endif %}
{% if settings.sticky is not null %}<b>{{ 'Status:'|t }}</b> {{ settings.sticky ? 'Flag/Star'|t : 'Unflag/Unstar'|t }}<br />{% endif %}
{% if settings.notes %}<b>{{ 'Notes:'|t }}</b> {{ settings.notes }}<br />{% endif %}
{% if settings.message %}<b>{{ 'Message:'|t }}</b> {{ settings.message }} ({{ settings.message_type }})<br />{% endif %}
{% if settings.data %}<b>{{ 'Data (keys):'|t }}</b> {{ settings.data|join('; ') }}<br />{% endif %}
<b>{{ 'Execute when:'|t }}</b> {{ settings.states|join('; ') }}<br />

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation for a summary of a webform debug handler.
*
* Available variables:
* - settings: The current configuration for this debug handler.
* - handler: The debug handler.
*
* @ingroup themeable
*/
#}
{{ 'Submission values will be displayed onscreen.'|t }}

View file

@ -0,0 +1,21 @@
{#
/**
* @file
* Default theme implementation for a summary of a webform email handler.
*
* Available variables:
* - settings: The current configuration for this email handler.
* - handler: The email handler.
*
* @ingroup themeable
*/
#}
{% if settings.debug %}<b class="color-error">{{ 'Debugging is enabled'|t }}</b><br />{% endif %}
<b>{{ 'To:'|t }}</b> {{ settings.to_mail }}<br />
{% if settings.cc_mail %}<b>{{ 'CC:'|t }}</b> {{ settings.cc_mail }}<br />{% endif %}
{% if settings.bcc_mail %}<b>{{ 'BCC:'|t }}</b> {{ settings.bcc_mail }}<br />{% endif %}
<b>{{ 'From:'|t }}</b> {% if settings.from_name %}{{ settings.from_name }}{% endif %} &lt;{{ settings.from_mail }}&gt;<br />
<b>{{ 'Subject:'|t }}</b> {{ settings.subject }}<br />
<b>{{ 'Settings:'|t }}</b> {{ settings.html ? 'HTML' : 'Plain text'|t }} {{ settings.html and settings.attachments ? '/' : '' }}{{ settings.attachments ? 'Attachments'|t : '' }} {{ settings.twig ? '(Twig)'|t : '' }}<br />
<b>{{ 'Sent when:'|t }}</b> {% if settings.states %}{{ settings.states|join('; ') }}{% else %}{{ 'Custom'|t }}{% endif %}<br />
{% if settings.theme_name %}<b>{{ 'Theme:'|t }}</b> {{ settings.theme_name }}<br />{% endif %}

View file

@ -0,0 +1,21 @@
{#
/**
* @file
* Default theme implementation for a summary of a webform remote posts handler.
*
* Available variables:
* - settings: The current configuration for this remote post handler.
* - handler: The remote post handler.
*
* @ingroup themeable
*/
#}
{% if settings.debug %}<b class="color-error">{{ 'Debugging is enabled'|t }}</b><br />{% endif %}
<b>{{ 'Completed URL:'|t }}</b> {{ settings.completed_url }}<br />
{% if settings.updated_url %}<b>{{ 'Updated URL:'|t }}</b> {{ settings.updated_url }}<br />{% endif %}
{% if settings.deleted_url %}<b>{{ 'Deleted URL:'|t }}</b> {{ settings.deleted_url }}<br />{% endif %}
{% if settings.draft_url %}<b>{{ 'Draft URL:'|t }}</b> {{ settings.draft_url }}<br />{% endif %}
{% if settings.converted_url %}<b>{{ 'Converted URL:'|t }}</b> {{ settings.converted_url }}<br />{% endif %}
<b>{{ 'Method:'|t }}</b> {{ settings.method }}<br />
{% if settings.method == 'POST' %}<b>{{ 'Type:'|t }}</b> {{ settings.type }}<br />{% endif %}
{% if settings.message or settings.messages %}<b>{{ 'Response message:'|t }}</b> {{ 'Yes'|t }}<br/>{% endif %}

View file

@ -0,0 +1,17 @@
{#
/**
* @file
* Default theme implementation for a summary of a webform settings handler.
*
* Available variables:
* - settings: The current configuration for this debug handler.
* - handler: The settings handler.
*
* @ingroup themeable
*/
#}
{% if settings.debug %}<b class="color-error">{{ 'Debugging is enabled'|t }}</b><br />{% endif %}
{% for setting in settings.settings %}
<b>{{ setting.title }}:</b> {{ setting.value }}<br />
{% endfor %}

View file

@ -0,0 +1,17 @@
{#
/**
* @file
* Theme implementation for webform help video using YouTube.
*
* Available variables
* - youtube_id: YouTube video id.
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.help') }}
<div class="webform-help-video-youtube">
<div class="webform-help-video-youtube--container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/{{ youtube_id }}?rel=0&modestbranding=1{{ autoplay ? '&autoplay=1' : '' }}"{{ autoplay ? 'allow="autoplay"' : '' }} frameborder="0" allowfullscreen></iframe>
</div>
</div>

View file

@ -0,0 +1,18 @@
{#
/**
* @file
* Theme implementation for webform help.
*
* Available variables
* - title: Help title.
* - content: Help content.
* - youtube_id: YouTube video id.
* - help: A render array content help title and content inside a details element.
*
* @see template_preprocess_webform_help()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.help') }}
{{ help }}

View file

@ -0,0 +1,20 @@
{#
/**
* @file
* Default theme implementation of a Webform horizontal_rule element.
*
* Available variables:
* - attributes: HTML attributes for the horizontal_rule element.
*
* @see template_preprocess_webform_horizontal_rule()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.horizontal_rule') }}
{%
set classes = [
'webform-horizontal-rule',
]
%}
<hr{{ attributes.addClass(classes) }} />

View file

@ -0,0 +1,27 @@
{#
/**
* @file
* Default theme implementation of a Webform message container.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - message: The rendered status_messages elements.
* - has_parent: A flag to indicate that the container has one or more parent
* containers.
* - closed: A flag to indicate that the message has been been closed and should
* not be displayed.
*
* @see template_preprocess_webform_message()
*
* @ingroup themeable
*/
#}
{%
set classes = [
has_parent ? 'js-form-wrapper',
has_parent ? 'form-wrapper',
]
%}
{% if not closed %}
<div{{ attributes.addClass(classes) }}>{{ message }}</div>
{% endif %}

View file

@ -0,0 +1,33 @@
{#
/**
* @file
* Default theme implementation for webform wizard progress bar.
*
* Available variables:
* - webform: A webform.
* - pages: Associatve array of wizard pages.
* - progress: Array of wizard progress containing page titles.
* - current_page: Current wizard page key.
* - current_index: The current wizard page index.
* - max_pages: Maximum number of pages to be displayed.
*
* @see template_preprocess_webform_progress_bar()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.progress.bar') }}
{% if progress|length < max_pages %}
<ol class="webform-progress-bar" data-steps="{{ progress|length }}">
{% for index, page in progress %}{%
set classes = [
'webform-progress-bar__page',
index < current_index ? 'webform-progress-bar__page--done',
index == current_index ? 'webform-progress-bar__page--current',
]
%}<li{{ attributes.setAttribute('data-webform-page', page.name).setAttribute('class', '').addClass(classes) }}>
<b>{{ page.title }}</b>{% if (loop.first or loop.last) %}<span></span>{% endif %}
</li>{% endfor %}
</ol>
{% endif %}

View file

@ -0,0 +1,47 @@
{#
/**
* @file
* Default theme implementation for webform wizard progress tracker.
*
* Available variables:
* - webform: A webform.
* - pages: Associatve array of wizard pages.
* - progress: Array of wizard progress containing page titles.
* - current_page: Current wizard page key.
* - current_index: The current wizard page index.
* - max_pages: Maximum number of pages that progress text should be displayed on.
*
* @see template_preprocess_webform_progress_bar()
* @see https://www.w3.org/WAI/tutorials/forms/multi-page/
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.progress.tracker') }}
<ul class="webform-progress-tracker progress-tracker progress-tracker--center">
{% for index, page in progress %}
{% set is_completed = index < current_index %}
{% set is_active = index == current_index %}
{%
set classes = [
'progress-step',
is_completed ? 'is-complete',
is_active ? 'is-active',
]
%}
<li{{ attributes.setAttribute('data-webform-page', page.name).setAttribute('title', page.title).setAttribute('class', '').addClass(classes) }}>
<span class="progress-marker">{{ index + 1 }}</span>
{% if progress|length < max_pages %}
<span class="progress-text">
<div class="progress-title">
{% if is_active or is_completed %}
<span class="visually-hidden">{{ is_active ? 'Current'|t : 'Completed'|t }}: </span>
{% endif %}
{{ page.title }}
</div>
</span>
{% endif %}
</li>
{% endfor %}
</ul>

View file

@ -0,0 +1,39 @@
{#
/**
* @file
* Default theme implementation for webform wizard progress.
*
* Available variables:
* - webform: A webform.
* - pages: Array of wizard pages.
* - current_page: Current wizard page.
* - total_pages: Current wizard page.
* - summary: Summary of progress.
* - percentage: Percentage completed.
* - bar: A progress bar.
*
* @see template_preprocess_webform_progress()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.progress') }}
<div class="webform-progress">
{{ bar }}
{% if summary or percentage %}
<div class="webform-progress__status">
{% if summary %}
<span class="webform-progress__summary">{{ summary }}</span>
{% if percentage %}
<span class="webform-progress__percentage">({{ percentage }})</span>
{% endif %}
{% else %}
<span class="webform-progress__percentage">{{ percentage }}</span>
{% endif %}
</div>
{% endif %}
</div>

View file

@ -0,0 +1,14 @@
{#
/**
* @file
* Default theme implementation for a webform required indicator.
*
* Available variables:
* - label: The required indicator label.
*
* @ingroup themeable
*/
#}
<div class="webform-required">
<span class="form-required"></span>{{ label }}
</div>

View file

@ -0,0 +1,62 @@
{#
/**
* @file
* Default theme implementation for a webform section element and its children.
*
* Available variables:
* - attributes: HTML attributes for the <section> element.
* - errors: (optional) Any errors for this <section> element, may not be set.
* - required: Boolean indicating whether the <section> element is required.
* - title: The title/header of the section header.
* - title_attributes: HTML attributes to apply to the title/header element.
* - title_tag: The title/header HTML tag.
* - 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 .section-wrapper children.
* - suffix: The content to add after the .section-wrapper children.
*
* Copied from: fieldset.html.twig
*
* @see template_preprocess_webform_section()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'js-form-item',
'form-item',
'js-form-wrapper',
'form-wrapper',
'webform-section',
]
%}
<section{{ attributes.addClass(classes) }}>
{%
set title_classes = [
'webform-section-title',
required ? 'js-form-required',
required ? 'form-required',
]
%}
<{{ title_tag }}{{ title_attributes.addClass(title_classes) }}>{{ title }}</{{ title_tag }}>
<div class="webform-section-wrapper">
{% if errors %}
<div>
{{ errors }}
</div>
{% endif %}
{% if description.content %}
<div{{ description.attributes.addClass('description') }}>{{ description.content }}</div>
{% endif %}
{% if prefix %}
<span class="field-prefix">{{ prefix }}</span>
{% endif %}
{{ children }}
{% if suffix %}
<span class="field-suffix">{{ suffix }}</span>
{% endif %}
</div>
</section>

View file

@ -0,0 +1,12 @@
{#
/**
* @file
* Default theme implementation for a webform submission form.
*
* Available variables:
* - form: The webform submission form.
*
* @ingroup themeable
*/
#}
{{ form }}

View file

@ -0,0 +1,64 @@
{#
/**
* @file
* Default theme implementation for webform submission information.
*
* Available variables:
* @todo Add variables.
*
* @see template_preprocess_webform_submission_information()
*
* @ingroup themeable
*/
#}
{% if submissions_view %}
<div><b>{{ 'Submission Number'|t }}:</b> {{ serial }}</div>
<div><b>{{ 'Submission ID'|t }}:</b> {{ sid }}</div>
<div><b>{{ 'Submission UUID'|t }}:</b> {{ uuid }}</div>
{% if uri %}
<div><b>{{ 'Submission URI'|t }}:</b> {{ uri }}</div>
{% endif %}
{% if token_update %}
<div><b>{{ 'Submission Update'|t }}:</b> {{ token_update }}</div>
{% endif %}
<br />
<div><b>{{ 'Created'|t }}:</b> {{ created }}</div>
<div><b>{{ 'Completed'|t }}:</b> {{ completed }}</div>
<div><b>{{ 'Changed'|t }}:</b> {{ changed }}</div>
<br />
<div><b>{{ 'Remote IP address'|t }}:</b> {{ remote_addr }}</div>
<div><b>{{ 'Submitted by'|t }}:</b> {{ submitted_by }}</div>
<div><b>{{ 'Language'|t }}:</b> {{ language }}</div>
<br />
<div><b>{{ 'Is draft'|t }}:</b> {{ is_draft }}</div>
{% if current_page %}
<div><b>{{ 'Current page'|t }}:</b> {{ current_page }}</div>
{% endif %}
<div><b>{{ 'Webform'|t }}:</b> {{ webform }}</div>
{% if submitted_to %}
<div><b>{{ 'Submitted to'|t }}:</b> {{ submitted_to }}</div>
{% endif %}
{% if sticky or locked or notes %}
<br />
{% if sticky %}
<div><b>{{ 'Flagged'|t }}:</b> {{ sticky }}</div>
{% endif %}
{% if locked %}
<div><b>{{ 'Locked'|t }}:</b> {{ locked }}</div>
{% endif %}
{% if notes %}
<div><b>{{ 'Notes'|t }}:</b><br/>
<pre>{{ notes }}</pre>
</div>
{% endif %}
{% endif %}
{% else %}
<div><b>{{ 'Submission Number'|t }}:</b> {{ serial }}</div>
<div><b>{{ 'Created'|t }}:</b> {{ created }}</div>
{% endif %}
{% if delete %}
<br/>
<div>{{ delete }}</div>
{% endif %}

View file

@ -0,0 +1,33 @@
{#
/**
* @file
* Default theme implementation to navigate webform submission.
*
* Available variables:
* - prev_url: URL to the previous webform submission.
* - next_url: URL to the next webform submission.
* - webform_id: The webform ID. Provided for context.
* - webform_title: The webform title. Provided for context.
*
* @see template_preprocess_webform_submission_navigation()
*
* @ingroup themeable
*/
#}
{% if prev_url or next_url %}
<nav id="webform-submission-navigation-{{ webform_id }}" class="webform-submission-navigation" role="navigation" aria-labelledby="webform-submission-label-{{ webform_id }}">
<h2 class="visually-hidden" id="webform-submission-label-{{ webform_id }}">Submission navigation links for {{ webform_title }}</h2>
<ul class="webform-submission-pager">
{% if prev_url %}
<li class="webform-submission-pager__item webform-submission-pager__item--previous">
<a href="{{ prev_url }}" rel="prev" title="{{ 'Go to previous page'|t }}"><b>{{ ''|t }}</b> {{ 'Previous submission'|t }}</a>
</li>
{% endif %}
{% if next_url %}
<li class="webform-submission-pager__item webform-submission-pager__item--next">
<a href="{{ next_url }}" rel="next" title="{{ 'Go to next page'|t }}">{{ 'Next submission'|t }} <b>{{ ''|t }}</b></a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}

View file

@ -0,0 +1,28 @@
{#
/**
* @file
* Default theme implementation for webform submission.
*
* Available variables:
* - elements: An array of elements to display in view mode.
* - webform_submission: The webform submission.
* - webform: The webform.
*
* @see template_preprocess_webform_submission()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'webform-submission',
'webform-submission--webform-' ~ webform.id()|clean_class,
webform_submission.isSticky() ? 'webform-submission--sticky',
view_mode ? 'webform-submission--view-mode-' ~ view_mode|clean_class,
]
%}
<div{{ attributes.addClass(classes) }}>
{{ navigation }}
{{ information }}
{{ submission }}
</div>

View file

@ -0,0 +1,28 @@
{#
/**
* @file
* Theme implementation for a 'webform' element.
*
* This is an copy of the webform.html.twig theme_wrapper which includes the
* 'title_prefix' and 'title_suffix' variables needed for
* contextual links to appear.
*
* Available variables
* - attributes: A list of HTML attributes for the wrapper element.
* - children: The child elements of the webform.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_webform()
* @see _webform_form_after_build()
*
* @ingroup themeable
*/
#}
<form{{ attributes }}>
{{ title_prefix }}
{{ children }}
{{ title_suffix }}
</form>