Background
In order to be consistent with the other warning about losing data when pressing the back button T272355, we are covering the similar situation of pressing close after making changes.
Requirements
- Show warning when:
- User edits an existing template with the VE dialog AND
- At least one edit is made where a value is added or changed (This means that adding a parameter but not giving it a value wouldn't cause the warning to show. If this is more complicated then we can include all edits.)
- Clicks on the close button or presses escape
- The OOUI quick confirm dialog opens with the confirmation message: Close template editor? Changes will be lost and cannot be undone. Button labels should say Keep editing and Close. The standard opacity for the background should be used.
- Update the warning dialog for when a user inserts a new template with the VE dialog and makes an edit (T272355) to match this implementation with the OOUI component. Message should be Go back to search? Edits will be lost and cannot be undone. The labels should be Keep editing and Go back
Mocks
Close dialog after changes | Go back to search after edits |