From 00f0c9fc26eafa4253d1a0a8c120074459d85f3c Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Fri, 25 Aug 2023 15:14:15 +0200 Subject: [PATCH] SUPP0RT-1184: Allowed os2forms attachment element in handler --- CHANGELOG.md | 2 ++ src/Plugin/WebformHandler/GetOrganizedWebformHandler.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 640a1e4..ecce4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/Plugin/WebformHandler/GetOrganizedWebformHandler.php b/src/Plugin/WebformHandler/GetOrganizedWebformHandler.php index c6a8390..48deb1d 100644 --- a/src/Plugin/WebformHandler/GetOrganizedWebformHandler.php +++ b/src/Plugin/WebformHandler/GetOrganizedWebformHandler.php @@ -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,