Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit c637bc3

Browse files
authored
Merge branch 'develop' into hotfix/remove-cpr
2 parents 7ec67bb + fbc2342 commit c637bc3

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
99

1010
## [Unreleased]
1111

12+
### Changed
13+
1214
- Remove CPR from exception
15+
- Added more recipient field types
16+
- Fixed error logging.
1317

1418
## [1.1.0]
1519

src/Helper/WebformHelperSF1601.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ public function processJob(Job $job): JobResult {
291291
return JobResult::success();
292292
}
293293
catch (\Exception $e) {
294-
$this->error($e->getMessage(), [
294+
$this->error('Error: @message', [
295+
'@message' => $e->getMessage(),
295296
'handler_id' => 'os2forms_digital_post',
296297
'operation' => 'digital post send',
297298
'webform_submission' => $submission ?? NULL,

src/Plugin/WebformHandler/WebformHandlerSF1601.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,17 @@ public function buildConfigurationForm(array $form, FormStateInterface $formStat
241241
private function getRecipientElements(): array {
242242
$elements = $this->getWebform()->getElementsDecodedAndFlattened();
243243

244+
$elementTypes = [
245+
'textfield',
246+
'cpr_element',
247+
'cpr_value_element',
248+
'cvr_element',
249+
'cvr_value_element',
250+
];
244251
$elements = array_filter(
245252
$elements,
246-
static function (array $element) {
247-
return in_array($element['#type'], ['textfield'], TRUE);
253+
static function (array $element) use ($elementTypes) {
254+
return in_array($element['#type'], $elementTypes, TRUE);
248255
}
249256
);
250257

0 commit comments

Comments
 (0)