Add unsaved changes warning in event details#1081
Add unsaved changes warning in event details#1081gregorydlogan merged 11 commits intoopencast:mainfrom
Conversation
Adds a confirmation modal that warns about unsaved changes to the following tabs of the event details: Metadata, Extended Metadata, Scheduling (for scheduled events), Workflows (for scheduled events). Thereby this fixes opencast#982. Includes opencast#1046, because I was expecting this to be tightly related to modals and did not want to write it twice. The general coding approach would be the same though. Speaking of approach, I would like feedback on if this makes for a good approach, or if there are better alternatives I've missed. If people agree with this approach it could then be extended to other modals (e.g. series) as well.
|
Use Run test server using develop.opencast.org as backend: Specify a different backend like stable.opencast.org: It may take a few seconds for the interface to spin up. |
|
This pull request is deployed at test.admin-interface.opencast.org/1081/2025-04-02_07-43-30/ . |
|
This pull request has conflicts ☹ |
…ing-event-details
|
This pull request has conflicts ☹ |
…ing-event-details
|
This pull request has conflicts ☹ |
|
This pull request has conflicts ☹ |
|
This pull request has conflicts ☹ |
|
This pull request has conflicts ☹ |
|
This pull request has conflicts ☹ |
|
This pull request has conflicts ☹ |
…t-admin-interface into main Pull request opencast#1081 Add unsaved changes warning in event details
Adds a confirmation modal that warns about unsaved changes to the following tabs of the event details:
Metadata,
Extended Metadata,
Scheduling (for scheduled events),
Workflows (for scheduled events).
Thereby this fixes #982.
Includes #1046, because I was expecting this to be tightly related to modals and did not want to write it twice. The general coding approach would be the same though.
Speaking of approach, I would like feedback on if this makes for a good approach, or if there are better alternatives I've missed. If people agree with this approach it could then be extended to other modals (e.g. series) as well.
Possible future improvements (for another PR?): Currently you are only warned about unsaved changes if you try to close the modal. However, changes are also lost if you switch between tabs (e.g. from Metadata to Assets). Maybe there should be a warning there as well?
How to test this
Can be tested as usual. Make sure the warning only appears if you actually made changes.