This means we don't need to reload the page, which is better for UX and allows us to keep the current client side image loaded without extra code to redirect back to the last image they worked on.
Data is posted as a JSON string using new API route ( api/post-contribution). This has been tested locally but the actual route on the server has been left out of this commit to avoid merge conflicts (this will be added in T224968: Setup new API route to receive posted contributions data
- Add postContribution(editType) method to Participation manager, which sends JSON string to server for depicts or captions
- Setup cancel and publish buttons for depicts and captions
- Added new functions to reset to initial state (for cancel buttons)
- Update stored initial data and button states after contribution is sent
- Create functions to get current depicts/captions data as shown in the UI (needed now this logic is used in more than one place)