Added confirm when leaving the page while a post is not completed or an image is not uploaded