From cb044cb0fbf86df51fd0066d0b26ebbfb159c098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 17 Nov 2016 15:41:28 +0100 Subject: [PATCH] Deactivate edit fields after saving --- frontend/app/components/wp-edit/wp-edit-form.directive.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/wp-edit/wp-edit-form.directive.ts b/frontend/app/components/wp-edit/wp-edit-form.directive.ts index 2e7eb7442f..e4f6245366 100644 --- a/frontend/app/components/wp-edit/wp-edit-form.directive.ts +++ b/frontend/app/components/wp-edit/wp-edit-form.directive.ts @@ -146,7 +146,10 @@ export class WorkPackageEditFormController { this.workPackage.save() .then(() => { - angular.forEach(this.fields, (field:WorkPackageEditFieldController) => field.setErrors([])); + angular.forEach(this.fields, (field:WorkPackageEditFieldController) => { + field.setErrors([]); + field.deactivate(); + }); deferred.resolve(this.workPackage); this.wpNotificationsService.showSave(this.workPackage, isInitial);