Skip to content

Commit

Permalink
Merge pull request #10 from OS2Forms/feature/SUPP0RT-1184-os2forms-at…
Browse files Browse the repository at this point in the history
…tachment-in-handler

SUPP0RT-1184: Allowed os2forms attachment element in handler
  • Loading branch information
jekuaitk authored Sep 29, 2023
2 parents 3c3008b + 00f0c9f commit 4d8b1b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ about writing changes to this log.

## [Unreleased]

* Allowed `os2forms_attachment` attachment element.

## [1.1.3] 04.07.2023

* Sanitized GetOrganized filenames.
Expand Down
5 changes: 4 additions & 1 deletion src/Plugin/WebformHandler/GetOrganizedWebformHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
$form['general']['attachment_element'] = [
'#type' => 'select',
'#title' => $this->t('Attachment element'),
'#options' => $this->getAvailableElementsByType(['webform_entity_print_attachment:pdf'], $elements),
'#options' => $this->getAvailableElementsByType([
'webform_entity_print_attachment:pdf',
'os2forms_attachment',
], $elements),
'#default_value' => $this->configuration['general']['attachment_element'] ?? '',
'#description' => $this->t('Choose the element responsible for creating response attachments.'),
'#required' => TRUE,
Expand Down

0 comments on commit 4d8b1b9

Please sign in to comment.