Add date fields for review requests.
Review Request #9158 — Created Aug. 29, 2017 and submitted
This change adds Python and JavaScript classes to add date-type fields in
review requests. Extensions can use this very simply by just subclassing
BaseDropdownField and providingfield_id
andlabel
attributes. The
resulting value will be stored inextra_data
as expected.
- Ran js-tests.
- Ran unit tests.
- Created a test extension that used a date field and verified that the
state was correctly rendered when loading the page and correctly stored when
the date was changed. Verified that invalid dates were cleared out.
Description | From | Last Updated |
---|---|---|
"Python" and "JavaScript" in the description. |
chipx86 | |
F401 'django.utils.timezone' imported but unused |
reviewbot | |
Col: 15 '$field' is defined but never used. |
reviewbot | |
Something bad happened here. |
chipx86 | |
"JavaScript" |
chipx86 | |
Blank line between these. |
chipx86 | |
bool |
chipx86 |
- Commit:
-
e2ca82c8565876a551164ed94c62e598d8e9ac8281498d88744556494f268a488842984c89090a5e
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Description:
-
~ This change adds python and javascript classes to add date-type fields in
~ This change adds Python and JavaScript classes to add date-type fields in
review requests. Extensions can use this very simply by just subclassing BaseDropdownField and providing field_id
andlabel
attributes. Theresulting value will be stored in extra_data
as expected.