Add dropdown fields for review requests.

Review Request #9157 — Created Aug. 29, 2017 and submitted

Information

Review Board
release-3.0.x
cb64f1f...

Reviewers

This change adds Python and JavaScript classes to add dropdown-type fields in
review requests. Extensions can use this very simply by just subclassing
BaseDropdownField and providing field_id, label, and options attributes.
The resulting value will be stored in extra_data as expected.

  • Ran js-tests.
  • Ran unit tests.
  • Created a test extension that used a dropdown field and verified that the
    state was correctly rendered when loading the page and correctly stored
    when the dropdown was changed.
Description From Last Updated

"Python" and "JavaScript" in the description.

chipx86chipx86

"JavaScript"

chipx86chipx86

bool

chipx86chipx86

Can you escape <option>?

chipx86chipx86

django.utils.safestring.SafeText

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    "Python" and "JavaScript" in the description.

  3. reviewboard/reviews/fields.py (Diff revision 1)
     
     
    Show all issues

    "JavaScript"

  4. reviewboard/reviews/fields.py (Diff revision 1)
     
     
    Show all issues

    bool

  5. reviewboard/reviews/fields.py (Diff revision 1)
     
     
    Show all issues

    Can you escape <option>?

  6. reviewboard/reviews/fields.py (Diff revision 1)
     
     
    Show all issues

    django.utils.safestring.SafeText

  7. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (4337cba)