Skip to content
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ before starting to add changes. Use example [placed in the end of the page](#exa

## [Unreleased]

- Adding children information to Attachment SBSYS
- os2forms_webform_maps translation page fix

## [6.0.0] 2026-09-30

- [PR-346](https://github.com/OS2Forms/os2forms/pull/346)
Drupal 11 compatibility.
- [#355](https://github.com/OS2Forms/os2forms/issues/355)
Children select elements warning fix.
- os2forms_webform_maps translation page fix

## [5.1.0] 2026-06-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @see \Drupal\webform\Plugin\WebformElementInterface
* @see \Drupal\webform\Annotation\WebformElement
*/
abstract class MitidChildElementBase extends WebformElementBase {
abstract class MitidChildElementBase extends WebformElementBase implements NemidChildElementInterface {

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Drupal\os2forms_nemid\Plugin\WebformElement;

/**
* Marks child-related Webform elements that provide one submission value.
*/
interface NemidChildElementInterface {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @see \Drupal\os2forms_nemid\Plugin\NemidElementBase
* @see \Drupal\os2forms_nemid\Element\NemidChildrenRadios
*/
class NemidChildrenRadios extends Radios implements NemidElementPersonalInterface, NemidPrepopulateFieldInterface {
class NemidChildrenRadios extends Radios implements NemidElementPersonalInterface, NemidPrepopulateFieldInterface, NemidChildElementInterface {

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @see \Drupal\os2forms_nemid\Plugin\NemidElementBase
* @see \Drupal\os2forms_nemid\Element\NemidChildrenRadios
*/
class NemidChildrenSelect extends Select implements NemidElementPersonalInterface, NemidPrepopulateFieldInterface {
class NemidChildrenSelect extends Select implements NemidElementPersonalInterface, NemidPrepopulateFieldInterface, NemidChildElementInterface {

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ protected static function getWebformElementsAsList(WebformSubmissionInterface $w
* Element configuration value
*/
public static function getConfigurationValue($name, array $config, WebformSubmissionInterface $webform_submission) {
if (!isset($config[$name])) {
return '';
}

if ($config[$name] == 'default_nemid_value') {
return 'default_nemid_value';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Form\FormStateInterface;
use Drupal\os2forms\Plugin\WebformElement\WebformAttachmentXml;
use Drupal\os2forms_nemid\Plugin\WebformElement\NemidChildElementInterface;
use Drupal\os2forms_nemid\Plugin\WebformElement\NemidElementBase;
use Drupal\webform\Plugin\WebformElement\DateBase;
use Drupal\webform\Plugin\WebformElement\TextBase;
Expand Down Expand Up @@ -123,7 +124,11 @@ public function form(array $form, FormStateInterface $form_state) {
}

// Skipping if is of type we do not support.
if (!$elementInstance instanceof TextBase && !$elementInstance instanceof NemidElementBase && !$elementInstance instanceof DateBase && !$elementInstance instanceof WebformComputedBase) {
if (!$elementInstance instanceof TextBase
&& !$elementInstance instanceof NemidElementBase
&& !$elementInstance instanceof DateBase
&& !$elementInstance instanceof WebformComputedBase
&& !$elementInstance instanceof NemidChildElementInterface) {
continue;
}

Expand Down
Loading