Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask for confirmation when trying to close modal dialog with changed site configuration #4915

Closed
Bellfalasch opened this issue May 9, 2017 · 1 comment
Assignees
Labels

Comments

@Bellfalasch
Copy link
Contributor

Some apps have a lot of settings for their site.xml. But if you edit these and by accident click outside the modal (on the black overlay background), the modal is closed without warning and all your changes are lost.

Prompt me with a warning before closing the modal! Also make sure the same happens when clicking any other close or cancel button. The user needs an extra chance to stop changes from being lost. The same way closing the edit of any other content works.

screen shot 2017-04-28 at 08 46 38
Click on the dark area and all changes are lost and the modal is closed. Not optimal UX.

@alansemenov
Copy link
Member

In onclick listener check if the form inside the dialog is "dirty". If it is, show the following confirmation message (similar to SaveBeforeCloseDialog):

You have made changes to the form, do you want to apply them?

The dialog itself should be masked when the confirmation is visible.

Also, important - make this check a setting ("off" by default) inside the ModalDialog class so that we could turn it on for any modal dialog we want. Confirmation message should also be configurable, but the default text should be as stated above.

@alansemenov alansemenov assigned edloidas and unassigned alansemenov Jun 2, 2017
edloidas added a commit that referenced this issue Jun 6, 2017
…4915

Added ConfirmationDialog and config to ModalDialog.
edloidas added a commit that referenced this issue Jun 7, 2017
…4915

Implemented `isDirty()` check in Forms.
Added `isDirty()` check to `ModalDialog` before opening confirmation dialog.
edloidas added a commit that referenced this issue Jun 12, 2017
…4915

Added possibility to close confirmation dialog without taking any action in original dialog.
edloidas added a commit that referenced this issue Jun 12, 2017
edloidas added a commit that referenced this issue Jun 12, 2017
…4915

Replaced single instance of ConfirmationDialog and made him remove itself on close.
Clicking outside the confirmation dialog will close it without action.
edloidas added a commit that referenced this issue Jun 12, 2017
…4915

Update close action to close dialog without confirmation.
edloidas added a commit that referenced this issue Jun 13, 2017
…4915

Added ConfirmationDialog and config to ModalDialog.
edloidas added a commit that referenced this issue Jun 13, 2017
…4915

Implemented `isDirty()` check in Forms.
Added `isDirty()` check to `ModalDialog` before opening confirmation dialog.
edloidas added a commit that referenced this issue Jun 13, 2017
…4915

Added possibility to close confirmation dialog without taking any action in original dialog.
edloidas added a commit that referenced this issue Jun 13, 2017
edloidas added a commit that referenced this issue Jun 13, 2017
…4915

Replaced single instance of ConfirmationDialog and made him remove itself on close.
Clicking outside the confirmation dialog will close it without action.
edloidas added a commit that referenced this issue Jun 13, 2017
…4915

Update close action to close dialog without confirmation.
alansemenov added a commit that referenced this issue Jun 13, 2017
Don't close site.xml modal without warning, if something is not saved #4915
@alansemenov alansemenov changed the title Don't close site.xml modal without warning, if something is not saved Don't close site configuration dialog without warning if something was changed Jun 22, 2017
@alansemenov alansemenov changed the title Don't close site configuration dialog without warning if something was changed Ask for confirmation when trying to close modal dialog with changed site configuration Jun 22, 2017
@srs srs closed this as completed Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants