diff --git a/src/admin/components/edition/importer-edition-form.vue b/src/admin/components/edition/importer-edition-form.vue
index 2e1fadadb..ca526621a 100644
--- a/src/admin/components/edition/importer-edition-form.vue
+++ b/src/admin/components/edition/importer-edition-form.vue
@@ -118,27 +118,58 @@
{{ $i18n.get('info_select_collection_to_list_metadata') }}
-
+ {{ $i18n.get('label_add_more_metadata') }}
{
+ this.metadatum = metadatum;
+ this.editedMetadatum = JSON.parse(JSON.stringify(metadatum));
+ this.editedMetadatum.saved = false;
+ this.editedMetadatum.status = 'publish';
+ this.isEditingMetadatum = true;
+ })
+ .catch((error) => {
+ this.$console.error(error);
+ });
},
- onEditionCanceled() {
- // this.formWithErrors = '';
- // delete this.editForms[this.openedMetadatumId];
- // this.openedMetadatumId = '';
- console.log("Metadatum Edition Canceled");
+ createNewMetadatum() {
+ this.fetchMetadatumTypes()
+ .then(() => {
+ this.isLoadingMetadatumTypes = false;
+ this.isNewMetadatumModalActive = true;
+ })
+ .catch(() => {
+ this.isLoadingMetadatumTypes = false;
+ });
+ },
+ onMetadatumEditionFinished() {
+ // Reset variables for metadatum creation
+ delete this.metadatum;
+ delete this.editedMetadatum;
+ this.isEditingMetadatum = false;
+ this.isNewMetadatumModalActive = false;
+ this.selectedMetadatumType = undefined;
+
+ // Generates options for metadata listing
+ this.isFetchingCollectionMetadata = true;
+ this.fetchMetadata({collectionId: this.collectionId, isRepositoryLevel: false, isContextEdit: false })
+ .then((metadata) => {
+ this.collectionMetadata = JSON.parse(JSON.stringify(metadata));
+ this.isFetchingCollectionMetadata = false;
+ })
+ .catch((error) => {
+ this.$console.error(error);
+ this.isFetchingCollectionMetadata = false;
+ });
+ },
+ onMetadatumEditionCanceled() {
+ // Reset variables for metadatum creation
+ delete this.metadatum;
+ delete this.editedMetadatum;
+ this.isEditingMetadatum = false;
+ this.isNewMetadatumModalActive = false;
+ this.selectedMetadatumType = undefined;
}
},
created() {
@@ -404,6 +496,16 @@ export default {
margin: 12px 0 6px 0;
}
+ .modal .animation-content {
+ width: 100%;
+ z-index: 99999;
+
+ #metadatumEditForm {
+ background-color: white;
+ }
+ }
+
+
diff --git a/src/admin/components/edition/metadatum-edition-form.vue b/src/admin/components/edition/metadatum-edition-form.vue
index e849912bd..6a11ab045 100644
--- a/src/admin/components/edition/metadatum-edition-form.vue
+++ b/src/admin/components/edition/metadatum-edition-form.vue
@@ -2,6 +2,7 @@