Warn user when leaving badge settings page and requests are still pending
When adding / saving / deleting a badge (https://gitlab.com/gitlab-org/gitlab-ce/issues/41174, https://gitlab.com/gitlab-org/gitlab-ce/issues/41176), the user should be warned when leaving the page before the action was successfully completed (https://gitlab.com/gitlab-org/gitlab-ce/issues/41174#note_61827720). We probably want to add a handler for the [`beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload) to achieve this. #### Design ![Screen_Shot_2018-03-09_at_13.25.06](https://gitlab.com/gitlab-org/gitlab-ce/uploads/8836f8080baa09ccca2990d805641d52/Screen_Shot_2018-03-09_at_13.25.06.png) #### Old Design ![project-badges--warning-modal](/uploads/de1a8990fd9bddb84dbb3531c49b1138/project-badges--warning-modal.png)
issue