Skip to content

Commit e236f04

Browse files
authored
Merge pull request #214 from itk-dev/hotfix/missing_cpr
Hotfix/missing cpr
2 parents 4569857 + a7356c5 commit e236f04

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CHANGELOG.md

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

1212
## [Unreleased]
1313

14+
- [PR-192](https://github.com/OS2Forms/os2forms/pull/192)
15+
Fix bug in MitidChildrenSelectAjaxBehaviour.php
1416
- [PR-228](https://github.com/OS2Forms/os2forms/pull/228)
1517
Added Drupal Core patch ensuring conditionals based upon computed twig
1618
works as intended.

modules/os2forms_nemid/src/Element/MitidChildrenSelectAjaxBehaviour.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public static function mitidChildrenSelectAjax(array &$form, FormStateInterface
4545
if ($cprPlugin->isReady()) {
4646
$cprLookupResult = $cprPlugin->lookup($childCpr);
4747

48+
if (!$cprLookupResult->isSuccessful()) {
49+
return $response;
50+
}
51+
4852
/** @var \Drupal\webform\WebformSubmissionForm $webformSubmissionForm */
4953
$webformSubmissionForm = $form_state->getFormObject();
5054
/** @var \Drupal\webform\WebformSubmissionInterface $webformSubmission */

modules/os2forms_nemid/src/Plugin/WebformElement/NemidPrepopulateFieldInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface NemidPrepopulateFieldInterface {
1414
/**
1515
* String representation of the prepopulate field key.
1616
*
17-
* Is used to prepopulate the field from the corresponding plugin..
17+
* Is used to prepopulate the field from the corresponding plugin.
1818
*
1919
* @param array $element
2020
* The element to prepopulate value for.

modules/os2forms_nemid/src/Service/FormsHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function retrieveCompanyLookupResult(FormStateInterface $form_state) {
268268
}
269269

270270
/**
271-
* Performs lookup of the company data..
271+
* Performs lookup of the company data.
272272
*
273273
* Uses CVR or P-number based services depending on the available values.
274274
*

0 commit comments

Comments
 (0)