Alert the user when closing the page without saving the changes in the post