fixed import of institutions that are not listed in the fix institution-list

Ref https://gitlab.com/oersi/metadata-form/-/issues/8
This commit is contained in:
Mirjan Hoffmann 2024-02-12 10:45:01 +01:00
parent be754d50ef
commit 85629206a3

View file

@ -528,6 +528,14 @@
institutionOptions += '<option value="' + item["ror"] + '"' + (item["ror"] === institution ? ' selected' : '') + '>' + item["label"] + '</option>';
organizationOptions += '<option value="' + item["ror"] + '"' + (item["ror"] === institution ? ' selected' : '') + '>' + item["label"] + '</option>';
});
if (institution?.length > 0 && !vocabInstitutions.find((e) => e["ror"] === institution)) {
if (affiliationName?.length > 0) {
institutionOptions += '<option value="' + institution + '"' + ' selected>' + affiliationName + '</option>';
}
if (organizationName?.length > 0) {
organizationOptions += '<option value="' + institution + '"' + ' selected>' + organizationName + '</option>';
}
}
let customInstitutionSelected = institution === "" && affiliationName !== "";
let customOrganizationSelected = institution === "" && organizationName !== "";
let radioGroupName = creatorList.childElementCount > 1 ? $(creatorList.lastElementChild.previousElementSibling).find('.inputType').find('input').attr('name') : ''