Skip to content

Commit 70bac84

Browse files
authored
Merge pull request #155 from OS2Forms/feature/maestro-notification-text-format
ITKDEV: Used configured format in maestro notification
2 parents f6f7c27 + 6d16747 commit 70bac84

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1111

1212
## [Unreleased]
1313

14+
- Updated Maestro notification handler assignment message format.
1415
- Updated `os2forms_fbs_handler` to use latest endpoints and operations.
1516

1617
## [3.21.0] 2024-12-17

modules/os2forms_forloeb/src/Plugin/WebformHandler/MaestroNotificationHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ final class MaestroNotificationHandler extends WebformHandlerBase {
2424
public const NOTIFICATION = 'notification';
2525

2626
public const TYPE = 'type';
27+
public const FORMAT = 'format';
2728
public const SENDER_LABEL = 'sender_label';
2829
public const NOTIFICATION_ENABLE = 'notification_enable';
2930
public const NOTIFICATION_RECIPIENT = 'notification_recipient';
@@ -153,7 +154,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $formStat
153154
}
154155
$form[self::NOTIFICATION][$notificationType][self::NOTIFICATION_CONTENT] = [
155156
'#type' => 'text_format',
156-
'#format' => 'restricted_html',
157+
'#format' => $this->configuration[self::NOTIFICATION][$notificationType][self::NOTIFICATION_CONTENT][self::FORMAT] ?? 'restricted_html',
157158
'#title' => $this->t('Message'),
158159
'#default_value' => $content ?? self::TOKEN_MAESTRO_TASK_URL,
159160
'#description' => $this->t('The actual notification content. Must contain the <code>@token_maestro_task_url</code> token which is the URL to the Maestro task.',

0 commit comments

Comments
 (0)