Merge pull request #4589 from MaximilianKrambach/updateFormPatch

don't autoupdate detail forms during editing
This commit is contained in:
Emanuel Schütze 2019-04-11 16:43:54 +02:00 committed by GitHub
commit cf7d3487d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -188,7 +188,7 @@ export class TopicDetailComponent extends BaseViewComponent {
if (newViewTopic && !this.editTopic) { if (newViewTopic && !this.editTopic) {
this.topic = newViewTopic; this.topic = newViewTopic;
// personalInfoForm is undefined during 'new' and directly after reloading // personalInfoForm is undefined during 'new' and directly after reloading
if (this.topicForm) { if (this.topicForm && !this.editTopic) {
this.patchForm(); this.patchForm();
} }
} }

View File

@ -333,7 +333,9 @@ export class AssignmentDetailComponent extends BaseViewComponent implements OnIn
this.repo.getViewModelObservable(assignmentId).subscribe(assignment => { this.repo.getViewModelObservable(assignmentId).subscribe(assignment => {
if (assignment) { if (assignment) {
this.assignment = assignment; this.assignment = assignment;
this.patchForm(this.assignment); if (!this.editAssignment) {
this.patchForm(this.assignment);
}
} }
}) })
); );

View File

@ -580,7 +580,9 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
if (motion) { if (motion) {
this.motion = motion; this.motion = motion;
this.newStateExtension = this.motion.stateExtension; this.newStateExtension = this.motion.stateExtension;
this.patchForm(this.motion); if (!this.editMotion) {
this.patchForm(this.motion);
}
} }
}), }),
this.repo.amendmentsTo(motionId).subscribe( this.repo.amendmentsTo(motionId).subscribe(