Add support for specifying a field's widget for tool plugins.

Review Request #6240 — Created Aug. 18, 2014 and submitted — Latest diff uploaded

Information

ReviewBot
release-0.2.x
c50f6cd...

Reviewers

Previously, we could only use the default widget for each field in a tool
plugin's options. This change allows us to specify which widget we want to use
on a field, along with any widget-specific attributes.

I also added a check to make sure that the field class we get is an actual
Field class.

  • Made fields without widgets specified.
  • Made a field, specifying the widget but no attributes, and saw the widget's
    default attributes get used.
  • Made a field, specifying the widget and its attributes.

I saw that the above fields were displayed correctly on the "Change Review Bot
Tool" page (see the attached screenshot), and was able to modify them.

  • Tried to make an invalid field, and saw the appropriate exception.
  • Tried to make an invalid widget, and saw the appropriate exception.

I also checked that all existing tool plugin forms display properly.