teknik-eksjo / chronos

A scheduling app that helps teachers submit workday outlines
MIT License
5 stars 5 forks source link

Prompt user before they leave unsubmitted edits to a teacher #87

Closed Greenheart closed 8 years ago

Greenheart commented 8 years ago

There is no confirm-modal before the admin leaves the /teachers/edit/x-route without saving information.

@hugolundin You were working on some modal-system?

I think this easily could be solved by looking for the first change in any of the input fields. If any change is detected, the variable unSavedChanges is set to true. If that variable is true when user tries to press "Tillbaka"-button, a confirmation modal is shown.