diff --git a/i18n/de.json b/i18n/de.json index 6c35c8a..029b52e 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -26,7 +26,10 @@ "LABEL_LICENSE_CHECKBOX_ND": "darf verändert werden", "LABEL_LICENSE_CHECKBOX_NC": "darf kommerziell genutzt werden", "LABEL_MANDATORY_FIELD": "Pflichtfeld", + "LABEL_ORGANIZATION": "Organisation", "LABEL_ORGANIZATION_CHOOSE": "Wähle Institution ...", + "LABEL_ORGANIZATION_NAME": "Name", + "LABEL_PERSON": "Person", "LABEL_STATUS": "Status", "LABEL_STATUS_DRAFT": "Entwurf", "LABEL_STATUS_INCOMPLETE": "Unvollständig", diff --git a/i18n/en.json b/i18n/en.json index edfb314..98d0712 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -26,7 +26,10 @@ "LABEL_LICENSE_CHECKBOX_ND": "may be changed", "LABEL_LICENSE_CHECKBOX_NC": "may be used commercially", "LABEL_MANDATORY_FIELD": "Mandatory field", + "LABEL_ORGANIZATION": "Organization", "LABEL_ORGANIZATION_CHOOSE": "Choose Institution ...", + "LABEL_ORGANIZATION_NAME": "Name", + "LABEL_PERSON": "Person", "LABEL_STATUS": "Status", "LABEL_STATUS_DRAFT": "Draft", "LABEL_STATUS_INCOMPLETE": "Incomplete", diff --git a/metadata-generator.html b/metadata-generator.html index eaffc98..e3eb6db 100644 --- a/metadata-generator.html +++ b/metadata-generator.html @@ -26,6 +26,18 @@ background-color: #0A1F40; border: 0; } + .btn-outline-primary { + color: #0A1F40; + border-color: #0A1F40; + } + .btn-outline-primary:not(:disabled):not(.disabled).active, .btn-outline-primary:not(:disabled):not(.disabled):active, .show > .btn-outline-primary.dropdown-toggle { + background-color: #0A1F40; + border-color: #0A1F40; + } + .btn-outline-primary:hover { + background-color: #0A1F40; + border-color: #0A1F40; + } .main { margin-top: 40px; @@ -410,7 +422,18 @@ return keywords.map((k) => k.trim()); } - function addCreator(firstName = "", lastName = "", authorId = "", institution = "") { + function changeCreatorType(creatorListItem, type) { + const personElements = creatorListItem.getElementsByClassName("person-element") + for (let i = 0; i < personElements.length; i++) { + personElements[i].style.display = type === "Person" ? "flex" : "none" + } + const organizationElements = creatorListItem.getElementsByClassName("organization-element") + for (let i = 0; i < organizationElements.length; i++) { + organizationElements[i].style.display = type === "Organization" ? "flex" : "none" + } + } + + function addCreator(firstName = "", lastName = "", authorId = "", institution = "", organizationName = "", type = "Person") { const creatorList = document.getElementById("creator-list"); const item = document.createElement("li"); item.setAttribute("class", "list-group-item"); @@ -421,6 +444,16 @@ item.innerHTML = `