@@ -19,7 +19,6 @@ import { RequestService } from '@dspace/core/data/request.service';
1919import { NotificationsService } from '@dspace/core/notification-system/notifications.service' ;
2020import { Collection } from '@dspace/core/shared/collection.model' ;
2121import { ItemType } from '@dspace/core/shared/item-relationships/item-type.model' ;
22- import { NONE_ENTITY_TYPE } from '@dspace/core/shared/item-relationships/item-type.resource-type' ;
2322import { MetadataValue } from '@dspace/core/shared/metadata.models' ;
2423import { getFirstSucceededRemoteListPayload } from '@dspace/core/shared/operators' ;
2524import {
@@ -51,7 +50,6 @@ import { FormComponent } from '../../shared/form/form.component';
5150import { UploaderComponent } from '../../shared/upload/uploader/uploader.component' ;
5251import { VarDirective } from '../../shared/utils/var.directive' ;
5352import {
54- collectionFormCorrectionSubmissionDefinitionSelectionConfig ,
5553 collectionFormEntityTypeSelectionConfig ,
5654 collectionFormModels ,
5755 collectionFormSharedWorkspaceCheckboxConfig ,
@@ -97,12 +95,6 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> imp
9795 */
9896 submissionDefinitionSelection : DynamicSelectModel < string > = new DynamicSelectModel ( collectionFormSubmissionDefinitionSelectionConfig ) ;
9997
100- /**
101- * The dynamic form field used for correction submission definition selection
102- * @type {DynamicSelectModel<string> }
103- */
104- correctionSubmissionDefinitionSelection : DynamicSelectModel < string > = new DynamicSelectModel ( collectionFormCorrectionSubmissionDefinitionSelectionConfig ) ;
105-
10698 sharedWorkspaceChekbox : DynamicCheckboxModel = new DynamicCheckboxModel ( collectionFormSharedWorkspaceCheckboxConfig ) ;
10799
108100 /**
@@ -145,13 +137,11 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> imp
145137 initializeForm ( ) {
146138 let currentRelationshipValue : MetadataValue [ ] ;
147139 let currentDefinitionValue : MetadataValue [ ] ;
148- let currentCorrectionDefinitionValue : MetadataValue [ ] ;
149140 let currentSharedWorkspaceValue : MetadataValue [ ] ;
150141 if ( this . dso && this . dso . metadata ) {
151142 currentRelationshipValue = this . dso . metadata [ 'dspace.entity.type' ] ;
152- currentDefinitionValue = this . dso . metadata [ 'cris.submission.definition' ] ;
153- currentCorrectionDefinitionValue = this . dso . metadata [ 'cris.submission.definition-correction' ] ;
154- currentSharedWorkspaceValue = this . dso . metadata [ 'cris.workspace.shared' ] ;
143+ currentDefinitionValue = this . dso . metadata [ 'dspace.submission.definition' ] ;
144+ currentSharedWorkspaceValue = this . dso . metadata [ 'dspace.workspace.shared' ] ;
155145 }
156146
157147 const entities$ : Observable < ItemType [ ] > = this . entityTypeService . findAll ( { elementsPerPage : 100 , currentPage : 1 } ) . pipe (
@@ -169,7 +159,6 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> imp
169159 . subscribe ( ( [ entityTypes , definitions ] : [ ItemType [ ] , SubmissionDefinitionModel [ ] ] ) => {
170160
171161 const sortedEntityTypes = entityTypes
172- . filter ( ( type : ItemType ) => type . label !== NONE_ENTITY_TYPE )
173162 . sort ( ( a , b ) => a . label . localeCompare ( b . label ) ) ;
174163
175164 sortedEntityTypes . forEach ( ( type : ItemType , index : number ) => {
@@ -190,22 +179,14 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> imp
190179 label : definition . name ,
191180 value : definition . name ,
192181 } as DynamicFormOptionConfig < string > ) ;
193- this . correctionSubmissionDefinitionSelection . add ( {
194- disabled : false ,
195- label : definition . name ,
196- value : definition . name ,
197- } as DynamicFormOptionConfig < string > ) ;
198182 if ( currentDefinitionValue && currentDefinitionValue . length > 0 && currentDefinitionValue [ 0 ] . value === definition . name ) {
199183 this . submissionDefinitionSelection . select ( index ) ;
200184 }
201- if ( currentCorrectionDefinitionValue && currentCorrectionDefinitionValue . length > 0 && currentCorrectionDefinitionValue [ 0 ] . value === definition . name ) {
202- this . correctionSubmissionDefinitionSelection . select ( index ) ;
203- }
204185 } ) ;
205186
206187 this . formModel = entityTypes . length === 0 ?
207- [ ...collectionFormModels , this . submissionDefinitionSelection , this . correctionSubmissionDefinitionSelection , this . sharedWorkspaceChekbox ] :
208- [ ...collectionFormModels , this . entityTypeSelection , this . submissionDefinitionSelection , this . correctionSubmissionDefinitionSelection , this . sharedWorkspaceChekbox ] ;
188+ [ ...collectionFormModels , this . submissionDefinitionSelection , this . sharedWorkspaceChekbox ] :
189+ [ ...collectionFormModels , this . entityTypeSelection , this . submissionDefinitionSelection , this . sharedWorkspaceChekbox ] ;
209190
210191 super . ngOnInit ( ) ;
211192
0 commit comments