Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -8,12 +8,11 @@
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_address()
* @see template_preprocess_webform_composite_address()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.composite') }}
{% if flexbox %}
{% if content.address %}

View file

@ -8,12 +8,11 @@
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_contact()
* @see template_preprocess_webform_composite_contact()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.composite') }}
{% if flexbox %}
{% if content.name or content.company %}

View file

@ -1,45 +0,0 @@
{#
/**
* @file
* Default theme implementation of a creditcard composite webform element.
*
* Available variables:
* - content: The creditcard webform element to be output.
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_creditcard()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.composite') }}
{% if flexbox %}
{{ content.warning }}
{% if content.name %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.name }}</div></div>
</div>
{% endif %}
<div class="webform-flexbox">
{% if content.type %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.type }}</div></div>
{% endif %}
<div class="webform-flex webform-flex--2"><div class="webform-flex--container">{{ content.number }}</div></div>
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.civ }}</div></div>
</div>
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">
{{ content.expiration }}
{{ content.expiration_month }}
{{ content.expiration_year }}
</div></div>
</div>
{% 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

@ -5,11 +5,10 @@
*
* Available variables:
* - content: The location webform element to be output.
* @see template_preprocess_webform_location()
*
* @see template_preprocess_webform_composite_location()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.composite') }}
{{ content }}

View file

@ -8,12 +8,11 @@
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_name()
* @see template_preprocess_webform_composite_name()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.composite') }}
{% if flexbox %}
<div class="webform-flexbox">
{% if content.title %}

View file

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

View file

@ -14,10 +14,12 @@
*/
#}
{{ attach_library('webform/webform.confirmation') }}
{% if progress %}
{{ progress }}
{% endif %}
<div{{ attributes.addClass('webform-confirmation') }}>
{% if progress %}
{{ progress }}
{% endif %}
{% if message %}
<div class="webform-confirmation__message">{{ message }}</div>
@ -28,4 +30,5 @@
<a href="{{ back_url }}" rel="back" title="{{ back_label }}"{{ back_attributes }}>{{ back_label }}</a>
</div>
{% endif %}
</div>

View file

@ -5,19 +5,10 @@
*
* Available variables:
* - element: The webform element.
* - id: The webform element id.
* - 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.
*/
#}
{% if options.email %}
<h3>{{ title }}</h3>
{{ value }}
{% else %}
<details data-webform-element-id="{{ id }}" open="open">
<summary role="button" aria-expanded="true" aria-pressed="true">{{ title }}</summary>
<div class="details-wrapper">{{ value }}</div>
</details>
{% endif %}

View file

@ -1,7 +1,7 @@
{#
/**
* @file
* Default theme implementation for a form base container as text.
* Default theme implementation for a webform base container as text.
*
* Available variables:
* - element: The form element.
@ -11,9 +11,4 @@
* - email: Flag to determine if element is for an email.
*/
#}
{% if title %}{{ title|upper }}
{% for i in 1..title|length %}-{% endfor %}
{% endif %}
{{ 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

@ -1,16 +1,21 @@
{#
/**
* @file
* Default theme implementation for a form base element as html.
* 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 title %}<b>{{ title }}</b><br/>{% endif %}
{{ value }}<br/><br/>
{% if options.email %}
{% if title %}<b>{{ title }}</b><br />{% endif %}{{ value }}<br /><br />
{% else %}
{{ item }}
{% endif %}

View file

@ -1,17 +0,0 @@
{#
/**
* @file
* Default theme implementation for a form color element value swatch.
*
* Using an inline style so that the color swatch will look okay when it is
* sent via email.
*
* Available variables:
* - element: The element.
* - value: The element's value.
* - 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.
*/
#}
<span style="display:inline-block; height:1em; width:1em; border:1px solid #000; background-color:{{ value }}"></span> {{ value }}

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

@ -9,7 +9,10 @@
* - 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') }}
<img src="{{ uri }}" class="webform-image-file" />
{{ image }}

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,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

@ -1,23 +1,21 @@
{#
/**
* @file
* Default theme implementation for a summary of a form email handler.
* Default theme implementation for a summary of a webform email handler.
*
* Available variables:
* - settings: The current configuration for this email handler:
* - handler: The handler information, including:
* - id: The handler plugin id.
* - handler_id: The handler id.
* - label: The handler label.
* - description: The handler description.
* - 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> {{ settings.from_mail }} {% if settings.from_name %}&lt;{{ settings.from_name }}&gt;{% endif %}<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 : '' }}
{% 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

@ -1,21 +1,21 @@
{#
/**
* @file
* Default theme implementation for a summary of a form remote posts handler.
* 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 handler information, including:
* - id: The handler plugin id.
* - handler_id: The handler id.
* - label: The handler label.
* - description: The handler description.
* - 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>{{ 'Insert URL:'|t }}</b> {{ settings.insert_url }}<br/>
{% if settings.update_url %}<b>{{ 'Update URL:'|t }}</b> {{ settings.update_url }}<br/>{% endif %}
{% if settings.delete_url %}<b>{{ 'Delete URL:'|t }}</b> {{ settings.delete_url }}<br/>{% endif %}
<b>{{ 'Type:'|t }}</b> {{ settings.type }}<br/>
{% 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

@ -12,6 +12,6 @@
{{ 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&autoplay=1" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/{{ youtube_id }}{{ autoplay ? '?autoplay=1' : '' }}" frameborder="0" allowfullscreen></iframe>
</div>
</div>

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

@ -1,7 +1,7 @@
{#
/**
* @file
* Default theme implementation from webform wizard progress bar.
* Default theme implementation for webform wizard progress bar.
*
* Available variables:
* - webform: A webform.
@ -20,14 +20,14 @@
{% if progress|length < max_pages %}
<ol class="webform-progress-bar" data-steps="{{ progress|length }}">
{% for index, title in progress %}{%
{% 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('class', '').addClass(classes) }}>
<b>{{ title }}</b>{% if (loop.first or loop.last) %}<span></span>{% endif %}
%}<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

@ -1,7 +1,7 @@
{#
/**
* @file
* Default theme implementation from webform wizard progress.
* Default theme implementation for webform wizard progress.
*
* Available variables:
* - webform: A webform.
@ -26,7 +26,7 @@
{% if summary or percentage %}
<div class="webform-progress__status">
{% if summary %}
<span class="webform-progress__'summary">{{ summary }}</span>
<span class="webform-progress__summary">{{ summary }}</span>
{% if percentage %}
<span class="webform-progress__percentage">({{ percentage }})</span>
{% endif %}

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

@ -1,14 +0,0 @@
{#
/**
* @file
* Default theme implementation from webform submission as HTML.
*
* Available variables:
* - data: The webform submission's data.
* @see template_preprocess_webform_submission_html()
*
* @ingroup themeable
*/
#}
{{ data }}

View file

@ -1,7 +1,7 @@
{#
/**
* @file
* Default theme implementation from webform submission information.
* Default theme implementation for webform submission information.
*
* Available variables:
* @todo Add variables.
@ -11,50 +11,54 @@
* @ingroup themeable
*/
#}
<details data-webform-element-id="{{ webform_id }}--submission_information"{% if open %} open="open"{% endif %}>
<summary role="button"{% if open %} aria-expanded="true" aria-pressed="true"{% endif %}>{{ 'Submission information'|t }}</summary>
<div class="details-wrapper">
{% 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 notes %}
<br/>
{% if sticky %}
<div><b>{{ 'Flagged'|t }}:</b> {{ sticky }}</div>
{% endif %}
{% if notes %}
<div><b>{{ 'Notes'|t }}:</b> {{ notes }}</div>
{% endif %}
{% endif %}
{% else %}
<div><b>{{ 'Submission ID'|t }}:</b> {{ sid }}</div>
<div><b>{{ 'Created'|t }}:</b> {{ created }}</div>
{% 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 %}
</div>
</details>
{% 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

@ -6,7 +6,8 @@
* 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_id: The webform ID. Provided for context.
* - webform_title: The webform title. Provided for context.
*
* @see template_preprocess_webform_submission_navigation()
*
@ -15,6 +16,7 @@
#}
{% 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">

View file

@ -1,14 +0,0 @@
{#
/**
* @file
* Default theme implementation from webform submission as a table.
*
* Available variables:
* - table: The webform submission's as a table.
* @see template_preprocess_webform_submission_table()
*
* @ingroup themeable
*/
#}
{{ table }}

View file

@ -1,27 +0,0 @@
{#
/**
* @file
* Default theme implementation from form submission as plain text.
*
* @ingroup themeable
*/
#}
--------------------------------------------------------------------------------
{{ 'Submission ID'|t }}: {{ sid }}
{{ 'Submission UUID'|t }}: {{ uuid }}
{{ 'Submission URI'|t }}: {{ uri }}
{{ 'Created'|t }}: {{ created }}
{{ 'Completed'|t }}: {{ completed }}
{{ 'Changed'|t }}: {{ changed }}
{{ 'Is draft'|t }}: {{ is_draft }}
{{ 'Current page'|t }}: {{ current_page }}
{{ 'Remote IP address'|t }}: {{ remote_addr }}
{{ 'Submitted by'|t }}: {{ submitted_by }}
{{ 'Language'|t }}: {{ language }}
{{ 'Form'|t }}: {{ form }}
{{ 'Submitted to'|t }}: {{ submitted_to }}
--------------------------------------------------------------------------------
{{ 'Submitted values are'|t }}:
{{ data }}

View file

@ -1,14 +0,0 @@
{#
/**
* @file
* Default theme implementation from webform submission as YAML.
*
* Available variables:
* - yaml: The webform submission as YAML.
* @see template_preprocess_webform_submission_yaml()
*
* @ingroup themeable
*/
#}
{{ yaml }}

View file

@ -0,0 +1,26 @@
{#
/**
* @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) }}>
{{ elements }}
</div>