diff --git a/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts b/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts index 263030156..37ffd7742 100644 --- a/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-types/editor/description-template-type-editor.component.ts @@ -150,7 +150,11 @@ export class DescriptionTemplateTypeEditorComponent extends BaseEditor onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete), + // for each state navigate to listing page + complete => { + this.formGroup = null; + this.router.navigate(['description-template-type']) + }, error => this.onCallbackError(error) ); } @@ -218,7 +222,7 @@ export class DescriptionTemplateTypeEditorComponent extends BaseEditor { if (result) { this.formGroup.get('status').setValue(DescriptionTemplateTypeStatus.Finalized); - this.persistEntity(); + this.formSubmit(); }}); } }