Prevent leaving the new and edit report page without saving. close #319

Code inspired by http://stackoverflow.com/a/21061009/1572236

I think this functionality might be interesting for other forms. Maybe we could abstract them in a twig template to reuse the code (with an 'include' declaration) or add this to all form automatically, by customizing the form_start or form_end function ?