I'd like to create the following functionality: If user clicks on a menu item and all changes were saved or there were no changes, another page is loaded. If changes were not saved then bootstrap modal window should be shown. I'd like to create the following functionality: