Fix error handling in "Upload Diff" and "Add File" dialogs.

Review Request #6112 — Created July 17, 2014 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
7dc5afc...

Reviewers

These dialogs are still driven by some pretty ancient javascript code in
common.js. All the backend code had been changed to use the new resource
models, but the error handling callback hadn't been updated for the new
attributes. The result of this was that instead of seeing an error in the form,
users would just see an endless "Loading..." spinner.

  • Tried to upload a .png file instead of a diff and saw the error shown next to
    the 'diff' field.
  • Tried to submit the 'Add File' form without selecting a file and saw the
    error shown next to the 'path' field.