Prevent the default action on the modal's buttons.

Adding `event.preventDefault()` prevents the browser from navigating to `#`, the href value assigned to the modal's buttons. It also instructs libraries like [Turbolinks](https://github.com/rails/turbolinks/) to ignore these button links.