Skip to content

Commit c643903

Browse files
authored
Merge pull request #121 from OS2Forms/release/3.15.5
Release/3.15.5
2 parents 119b31e + 0a39f1d commit c643903

36 files changed

+1301
-25
lines changed

CHANGELOG.md

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

1212
## [Unreleased]
1313

14+
## [3.15.5] 2024-07-12
15+
16+
- [#111](https://github.com/OS2Forms/os2forms/pull/111)
17+
Adding child select autopopulate fields
18+
1419
## [3.15.4] 2024-07-08
1520

1621
- [#117](https://github.com/OS2Forms/os2forms/pull/117)

modules/os2forms_digital_post/src/Plugin/WebformHandler/WebformHandlerSF1601.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,14 @@ private function getRecipientElements(): array {
217217
'os2forms_nemid_company_cvr_fetch_data',
218218
'os2forms_nemid_cpr',
219219
'os2forms_person_lookup',
220+
'os2forms_mitid_child_other_guardian',
220221
// @todo Remove these when we remove the elements.
221222
'cpr_element',
222223
'cpr_value_element',
223224
'cvr_element',
224225
'cvr_value_element',
225226
];
227+
226228
$elements = array_filter(
227229
$elements,
228230
static function (array $element) use ($elementTypes) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ private function getRecipientElementOptions(): array {
239239
'cvr_element',
240240
'cvr_value_element',
241241
'os2forms_person_lookup',
242+
'os2forms_mitid_child_other_guardian',
242243
];
243244

244245
$isAllowedElement = static fn ($e) => in_array($e['#type'], $elementTypes, TRUE);
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
namespace Drupal\os2forms_nemid\Element;
4+
5+
use Drupal\Core\Form\FormStateInterface;
6+
7+
/**
8+
* Provides a 'os2forms_mitid_child_address'.
9+
*
10+
* @FormElement("os2forms_mitid_child_address")
11+
*
12+
* @see \Drupal\Core\Render\Element\FormElement
13+
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement
14+
* @see \Drupal\Core\Render\Element\RenderElement
15+
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element
16+
* @see \Drupal\os2forms_nemid\Element\NemidName
17+
*/
18+
class MitidChildAddress extends NemidElementBase {
19+
20+
/**
21+
* {@inheritdoc}
22+
*/
23+
public function getInfo() {
24+
$class = get_class($this);
25+
return parent::getInfo() + [
26+
'#process' => [
27+
[$class, 'processMitidChildAddress'],
28+
[$class, 'processAjaxForm'],
29+
],
30+
'#element_validate' => [
31+
[$class, 'validateMitidChildAddress'],
32+
],
33+
'#pre_render' => [
34+
[$class, 'preRenderMitidChildAddress'],
35+
],
36+
'#theme' => 'input__os2forms_mitid_child_address',
37+
];
38+
}
39+
40+
/**
41+
* Processes a 'os2forms_mitid_child_address' element.
42+
*/
43+
public static function processMitidChildAddress(&$element, FormStateInterface $form_state, &$complete_form) {
44+
// Here you can add and manipulate your element's properties and callbacks.
45+
return $element;
46+
}
47+
48+
/**
49+
* Webform element validation handler for 'os2forms_mitid_child_address'.
50+
*/
51+
public static function validateMitidChildAddress(&$element, FormStateInterface $form_state, &$complete_form) {
52+
// Here you can add custom validation logic.
53+
}
54+
55+
/**
56+
* {@inheritdoc}
57+
*/
58+
public static function preRenderMitidChildAddress(array $element) {
59+
$element = parent::prerenderNemidElementBase($element);
60+
static::setAttributes($element, ['form-text', 'os2forms-mitid-child-address']);
61+
return $element;
62+
}
63+
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
namespace Drupal\os2forms_nemid\Element;
4+
5+
use Drupal\Core\Form\FormStateInterface;
6+
7+
/**
8+
* Provides a 'os2forms_mitid_child_apartment_nr'.
9+
*
10+
* @FormElement("os2forms_mitid_child_apartment_nr")
11+
*
12+
* @see \Drupal\Core\Render\Element\FormElement
13+
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement
14+
* @see \Drupal\Core\Render\Element\RenderElement
15+
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element
16+
* @see \Drupal\os2forms_nemid\Element\NemidApartmentNr
17+
*/
18+
class MitidChildApartmentNr extends NemidElementBase {
19+
20+
/**
21+
* {@inheritdoc}
22+
*/
23+
public function getInfo() {
24+
$class = get_class($this);
25+
return parent::getInfo() + [
26+
'#process' => [
27+
[$class, 'processMitidChildApartmentNr'],
28+
[$class, 'processAjaxForm'],
29+
],
30+
'#element_validate' => [
31+
[$class, 'validateMitidChildApartmentNr'],
32+
],
33+
'#pre_render' => [
34+
[$class, 'preRenderMitidChildApartmentNr'],
35+
],
36+
'#theme' => 'input__os2forms_mitid_child_apartmentNr',
37+
];
38+
}
39+
40+
/**
41+
* Processes a 'os2forms_mitid_child_apartmentNr' element.
42+
*/
43+
public static function processMitidChildApartmentNr(&$element, FormStateInterface $form_state, &$complete_form) {
44+
// Here you can add and manipulate your element's properties and callbacks.
45+
return $element;
46+
}
47+
48+
/**
49+
* Webform element validation handler 'os2forms_mitid_child_apartmentNr'.
50+
*/
51+
public static function validateMitidChildApartmentNr(&$element, FormStateInterface $form_state, &$complete_form) {
52+
// Here you can add custom validation logic.
53+
}
54+
55+
/**
56+
* {@inheritdoc}
57+
*/
58+
public static function preRenderMitidChildApartmentNr(array $element) {
59+
$element = parent::prerenderNemidElementBase($element);
60+
static::setAttributes($element, ['form-text', 'os2forms-mitid-child-apartment-nr']);
61+
return $element;
62+
}
63+
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
namespace Drupal\os2forms_nemid\Element;
4+
5+
use Drupal\Core\Form\FormStateInterface;
6+
7+
/**
8+
* Provides a 'os2forms_mitid_child_city'.
9+
*
10+
* @FormElement("os2forms_mitid_child_city")
11+
*
12+
* @see \Drupal\Core\Render\Element\FormElement
13+
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement
14+
* @see \Drupal\Core\Render\Element\RenderElement
15+
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element
16+
* @see \Drupal\os2forms_nemid\Element\NemidCity
17+
*/
18+
class MitidChildCity extends NemidElementBase {
19+
20+
/**
21+
* {@inheritdoc}
22+
*/
23+
public function getInfo() {
24+
$class = get_class($this);
25+
return parent::getInfo() + [
26+
'#process' => [
27+
[$class, 'processMitidChildCity'],
28+
[$class, 'processAjaxForm'],
29+
],
30+
'#element_validate' => [
31+
[$class, 'validateMitidChildCity'],
32+
],
33+
'#pre_render' => [
34+
[$class, 'preRenderMitidChildCity'],
35+
],
36+
'#theme' => 'input__os2forms_mitid_child_city',
37+
];
38+
}
39+
40+
/**
41+
* Processes a 'os2forms_mitid_child_city' element.
42+
*/
43+
public static function processMitidChildCity(&$element, FormStateInterface $form_state, &$complete_form) {
44+
// Here you can add and manipulate your element's properties and callbacks.
45+
return $element;
46+
}
47+
48+
/**
49+
* Webform element validation handler for #type 'os2forms_mitid_child_city'.
50+
*/
51+
public static function validateMitidChildCity(&$element, FormStateInterface $form_state, &$complete_form) {
52+
// Here you can add custom validation logic.
53+
}
54+
55+
/**
56+
* {@inheritdoc}
57+
*/
58+
public static function preRenderMitidChildCity(array $element) {
59+
$element = parent::prerenderNemidElementBase($element);
60+
static::setAttributes($element, ['form-text', 'os2forms-mitid-child-city']);
61+
return $element;
62+
}
63+
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
namespace Drupal\os2forms_nemid\Element;
4+
5+
use Drupal\Core\Form\FormStateInterface;
6+
7+
/**
8+
* Provides a 'os2forms_mitid_child_coaddress'.
9+
*
10+
* @FormElement("os2forms_mitid_child_coaddress")
11+
*
12+
* @see \Drupal\Core\Render\Element\FormElement
13+
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement
14+
* @see \Drupal\Core\Render\Element\RenderElement
15+
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element
16+
* @see \Drupal\os2forms_nemid\Element\NemidCoaddress
17+
*/
18+
class MitidChildCoaddress extends NemidElementBase {
19+
20+
/**
21+
* {@inheritdoc}
22+
*/
23+
public function getInfo() {
24+
$class = get_class($this);
25+
return parent::getInfo() + [
26+
'#process' => [
27+
[$class, 'processMitidChildCoaddress'],
28+
[$class, 'processAjaxForm'],
29+
],
30+
'#element_validate' => [
31+
[$class, 'validateMitidChildCoaddress'],
32+
],
33+
'#pre_render' => [
34+
[$class, 'preRenderMitidChildCoaddress'],
35+
],
36+
'#theme' => 'input__os2forms_mitid_child_coaddress',
37+
];
38+
}
39+
40+
/**
41+
* Processes a 'os2forms_mitid_child_coaddress' element.
42+
*/
43+
public static function processMitidChildCoaddress(&$element, FormStateInterface $form_state, &$complete_form) {
44+
// Here you can add and manipulate your element's properties and callbacks.
45+
return $element;
46+
}
47+
48+
/**
49+
* Webform element validation handler for 'os2forms_mitid_child_coaddress'.
50+
*/
51+
public static function validateMitidChildCoaddress(&$element, FormStateInterface $form_state, &$complete_form) {
52+
// Here you can add custom validation logic.
53+
}
54+
55+
/**
56+
* {@inheritdoc}
57+
*/
58+
public static function preRenderMitidChildCoaddress(array $element) {
59+
$element = parent::prerenderNemidElementBase($element);
60+
static::setAttributes($element, ['form-text', 'os2forms-mitid-child-coaddress']);
61+
return $element;
62+
}
63+
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
namespace Drupal\os2forms_nemid\Element;
4+
5+
use Drupal\Core\Form\FormStateInterface;
6+
7+
/**
8+
* Provides a 'os2forms_mitid_child_cpr'.
9+
*
10+
* @FormElement("os2forms_mitid_child_cpr")
11+
*
12+
* @see \Drupal\Core\Render\Element\FormElement
13+
* @see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21FormElement.php/class/FormElement
14+
* @see \Drupal\Core\Render\Element\RenderElement
15+
* @see https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Element
16+
* @see \Drupal\os2forms_nemid\Element\NemidCpr
17+
*/
18+
class MitidChildCpr extends NemidElementBase {
19+
20+
/**
21+
* {@inheritdoc}
22+
*/
23+
public function getInfo() {
24+
$class = get_class($this);
25+
return parent::getInfo() + [
26+
'#process' => [
27+
[$class, 'processMitidChildCpr'],
28+
[$class, 'processAjaxForm'],
29+
],
30+
'#element_validate' => [
31+
[$class, 'validateMitidChildCpr'],
32+
],
33+
'#pre_render' => [
34+
[$class, 'preRenderMitidChildCpr'],
35+
],
36+
'#theme' => 'input__os2forms_mitid_child_cpr',
37+
];
38+
}
39+
40+
/**
41+
* Processes a 'os2forms_mitid_child_cpr' element.
42+
*/
43+
public static function processMitidChildCpr(&$element, FormStateInterface $form_state, &$complete_form) {
44+
// Here you can add and manipulate your element's properties and callbacks.
45+
return $element;
46+
}
47+
48+
/**
49+
* Webform element validation handler for #type 'os2forms_mitid_child_cpr'.
50+
*/
51+
public static function validateMitidChildCpr(&$element, FormStateInterface $form_state, &$complete_form) {
52+
// Here you can add custom validation logic.
53+
}
54+
55+
/**
56+
* {@inheritdoc}
57+
*/
58+
public static function preRenderMitidChildCpr(array $element) {
59+
$element = parent::prerenderNemidElementBase($element);
60+
static::setAttributes($element, ['form-text', 'os2forms-mitid-child-cpr']);
61+
return $element;
62+
}
63+
64+
}

0 commit comments

Comments
 (0)