Disable commenting when there's a pending draft of a review request.

Review Request #4143 — Created May 12, 2013 and submitted — Latest diff uploaded

Information

Review Board
release-1.7.x

Reviewers

Disable commenting when there's a pending draft of a review request.

A common mistake is to put up a new diff or file attachment and then try
to comment on it before publishing the draft. This doesn't work, and
will fail on an API level, but we didn't tell the user at any point that
they should expect problems doing that.

Now, the dialog will tell the user they must publish before they can
comment on the diff or file. All the fields will be disabled.

Note that bug #831 requests that we *allow* commenting. That's a much
bigger problem to solve, and one we won't be solving as part of this
change. This just fixes the unexpected failure case.
Uploaded a file and tried commenting on it, and on the diff for that
review request. It wouldn't let me. Saw the error and saw that the fields
were all disabled.

Published the review request and tried again. This time I could leave a
comment.