Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.1]

## Changed

- Updated allowed attachment elements to contain `os2forms_attachment`

## [2.0.0]

### Changed
Expand Down Expand Up @@ -61,7 +67,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
“KombiPostAfsend”](https://digitaliseringskataloget.dk/integration/sf1601).
- Added GitHub Actions for coding standards checks and code analysis.

[Unreleased]: https://github.com/itk-dev/os2forms_digital_post/compare/2.0.0...HEAD
[Unreleased]: https://github.com/itk-dev/os2forms_digital_post/compare/2.0.1...HEAD
[2.0.1]: https://github.com/itk-dev/os2forms_digital_post/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/itk-dev/os2forms_digital_post/compare/1.2.3...2.0.0
[1.2.3]: https://github.com/itk-dev/os2forms_digital_post/compare/1.2.2...1.2.3
[1.2.2]: https://github.com/itk-dev/os2forms_digital_post/compare/1.2.0...1.2.2
Expand Down
8 changes: 6 additions & 2 deletions src/Plugin/WebformHandler/WebformHandlerSF1601.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,14 @@ static function (array $element) use ($elementTypes) {
private function getAttachmentElements(): array {
$elements = $this->getWebform()->getElementsDecodedAndFlattened();

$elementTypes = [
'webform_entity_print_attachment:pdf',
'os2forms_attachment',
];
$elements = array_filter(
$elements,
static function (array $element) {
return preg_match('/^webform_entity_print_attachment:(pdf)$/', $element['#type'] ?? NULL);
static function (array $element) use ($elementTypes) {
return in_array($element['#type'], $elementTypes, TRUE);
}
);

Expand Down