diff --git a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.ts b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.ts index bf703b3d0..9a9e08f34 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.ts @@ -27,7 +27,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit { @Input() isNewVersion: boolean; @Input() isNew: boolean; @Input() isUserOwner: boolean; - @Input() isClone: boolean; + @Input() isClone: boolean = false; isCreateNew = false; isCreateNewProject = false; @@ -145,7 +145,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit { this.grantformGroup.get('existGrant').disable(); this.grantformGroup.get('label').enable(); this.grantformGroup.get('description').enable(); - } else if (this.isClone) { + } else if (this.isClone && !this.isNewVersion) { this.grantformGroup.get('existGrant').enable(); this.grantformGroup.get('label').disable(); this.grantformGroup.get('label').reset(); @@ -169,7 +169,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit { this.projectFormGroup.get('existProject').disable(); this.projectFormGroup.get('label').enable(); this.projectFormGroup.get('description').enable(); - } else if (this.isClone) { + } else if (this.isClone && !this.isNewVersion) { this.projectFormGroup.get('existProject').enable(); this.projectFormGroup.get('label').disable() this.projectFormGroup.get('label').reset(); @@ -192,7 +192,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit { if (this.isCreateNewFunder) { this.funderFormGroup.get('existFunder').disable(); this.funderFormGroup.get('label').enable(); - } else if (this.isClone) { + } else if (this.isClone && !this.isNewVersion) { if (this.funderFormGroup.get('existFunder')) { this.funderFormGroup.get('existFunder').enable(); this.funderFormGroup.get('label').disable();