From 85629206a3a6f31a12084c518c7cfab03ccdf511 Mon Sep 17 00:00:00 2001 From: Mirjan Hoffmann Date: Mon, 12 Feb 2024 10:45:01 +0100 Subject: [PATCH] fixed import of institutions that are not listed in the fix institution-list Ref https://gitlab.com/oersi/metadata-form/-/issues/8 --- metadata-generator.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/metadata-generator.html b/metadata-generator.html index 51e60a6..68b075b 100644 --- a/metadata-generator.html +++ b/metadata-generator.html @@ -528,6 +528,14 @@ institutionOptions += ''; organizationOptions += ''; }); + if (institution?.length > 0 && !vocabInstitutions.find((e) => e["ror"] === institution)) { + if (affiliationName?.length > 0) { + institutionOptions += ''; + } + if (organizationName?.length > 0) { + organizationOptions += ''; + } + } let customInstitutionSelected = institution === "" && affiliationName !== ""; let customOrganizationSelected = institution === "" && organizationName !== ""; let radioGroupName = creatorList.childElementCount > 1 ? $(creatorList.lastElementChild.previousElementSibling).find('.inputType').find('input').attr('name') : ''