;
+ /**
+ * The type of edit field that should be displayed
+ */
+ fieldType: EditMetadataValueFieldType;
+
/**
* Whether or not the authority field is currently being edited
*/
@@ -233,6 +243,12 @@ export class DsoEditMetadataValueComponent implements OnInit, OnChanges {
this.initAuthorityProperties();
}
+ ngOnChanges(changes: SimpleChanges): void {
+ if (changes.mdField) {
+ this.fieldType = this.getFieldType();
+ }
+ }
+
/**
* Initialise potential properties of a virtual metadata value
*/
@@ -252,6 +268,17 @@ export class DsoEditMetadataValueComponent implements OnInit, OnChanges {
);
}
+ /**
+ * Retrieves the {@link EditMetadataValueFieldType} to be displayed for the current field while in edit mode.
+ */
+ getFieldType(): EditMetadataValueFieldType {
+ if (this.mdField === 'dspace.entity.type') {
+ return EditMetadataValueFieldType.ENTITY_TYPE;
+ }
+ return EditMetadataValueFieldType.PLAIN_TEXT;
+ }
+
+
/**
* Initialise potential properties of a authority controlled metadata field
*/
diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html
index f8b193f4a05..659f00e5398 100644
--- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html
+++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html
@@ -40,6 +40,8 @@
[]): Observable>> {
+ return createSuccessfulRemoteDataObject$(createPaginatedList());
+ }
+
}