Add confirmation dialog for post-commit review requests on web UI

Review Request #10148 — Created Sept. 17, 2018 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
9efe7bf...

Reviewers

When a user is scrolling through the changeset (post commit review) to
make a new review request on the web UI, clicking on the row of a
commit makes a new review request, which can be done accidentally very
easily.

I added a confirmation dialog when creating post-commit review requests
on web UI so the user can confirm that they want to create a new review
request from that commit. Clicking 'cancel' closes the dialog and takes
no further action, clicking 'create' creates a new review request.

Ran JS tests (all of which pass).

Tested behaviour in Chrome, Safari, and Firefox with the following
scenarios:

  1. Click on commit, click cancel on confirmation dialog
  2. Click on commit with no diff with master, click confirm, see error
    message
  3. Click on commit with diff with master, click confirm, see review
    request created

    Loading...