diff --git a/CHANGELOG.md b/CHANGELOG.md index bebf002..614b873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +- [PR-192](https://github.com/OS2Forms/os2forms/pull/192) + Fix bug in MitidChildrenSelectAjaxBehaviour.php - [PR-228](https://github.com/OS2Forms/os2forms/pull/228) Added Drupal Core patch ensuring conditionals based upon computed twig works as intended. diff --git a/modules/os2forms_nemid/src/Element/MitidChildrenSelectAjaxBehaviour.php b/modules/os2forms_nemid/src/Element/MitidChildrenSelectAjaxBehaviour.php index e88c218..c38f94c 100644 --- a/modules/os2forms_nemid/src/Element/MitidChildrenSelectAjaxBehaviour.php +++ b/modules/os2forms_nemid/src/Element/MitidChildrenSelectAjaxBehaviour.php @@ -45,6 +45,10 @@ public static function mitidChildrenSelectAjax(array &$form, FormStateInterface if ($cprPlugin->isReady()) { $cprLookupResult = $cprPlugin->lookup($childCpr); + if (!$cprLookupResult->isSuccessful()) { + return $response; + } + /** @var \Drupal\webform\WebformSubmissionForm $webformSubmissionForm */ $webformSubmissionForm = $form_state->getFormObject(); /** @var \Drupal\webform\WebformSubmissionInterface $webformSubmission */ diff --git a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidPrepopulateFieldInterface.php b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidPrepopulateFieldInterface.php index c107105..74867f7 100644 --- a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidPrepopulateFieldInterface.php +++ b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidPrepopulateFieldInterface.php @@ -14,7 +14,7 @@ interface NemidPrepopulateFieldInterface { /** * String representation of the prepopulate field key. * - * Is used to prepopulate the field from the corresponding plugin.. + * Is used to prepopulate the field from the corresponding plugin. * * @param array $element * The element to prepopulate value for. diff --git a/modules/os2forms_nemid/src/Service/FormsHelper.php b/modules/os2forms_nemid/src/Service/FormsHelper.php index 7ac569e..f4a7fe8 100644 --- a/modules/os2forms_nemid/src/Service/FormsHelper.php +++ b/modules/os2forms_nemid/src/Service/FormsHelper.php @@ -268,7 +268,7 @@ public function retrieveCompanyLookupResult(FormStateInterface $form_state) { } /** - * Performs lookup of the company data.. + * Performs lookup of the company data. * * Uses CVR or P-number based services depending on the available values. *