Skip to content

Commit

Permalink
Add a warning when leaving the page with unsaved changes
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-glombik committed Nov 28, 2024
1 parent 4403d25 commit 2f273da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/webapp/app/lecture/lecture-update.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ export class LectureUpdateComponent implements OnInit, OnDestroy {
}

ngOnDestroy() {
if (this.isChangeMadeToTitleOrPeriodSection) {
// TODO add a proper modal and find out where the changes are
alert('Unsaved changes in Title and/or period section, are you sure you want to leave without saving?');
}
this.subscriptions.unsubscribe();
}

Expand Down

0 comments on commit 2f273da

Please sign in to comment.