Pre-fill metadata on Publish page #142

Merged
alexliebowitz merged 10 commits from prefill-publish into publishing 2017-06-19 16:19:54 +02:00

10 commits

Author SHA1 Message Date
Alex Liebowitz
12f2529769 Show content metadata (title, etc.) when updating an existing claim
Before, it would only show metadata if you chose a file.
2017-06-18 23:50:37 -04:00
Alex Liebowitz
91a323ab69 Pre-fill license info from drop-down if match is found 2017-06-18 23:50:37 -04:00
Alex Liebowitz
ca06591d03 Add FormField.getOptions() and FormRow.getOptions() 2017-06-18 23:50:37 -04:00
Alex Liebowitz
50dcb046bb Clean up and simplify handling of license description and URL
- General style and organization improvements
 - Convert license type selector to controlled component
 - Instead of trying to return the right description and URL directly
   from the components, keep the view simple and compute the description
   and URL at submit time.
2017-06-18 23:50:37 -04:00
Alex Liebowitz
051e361c07 Remove a couple of state keys no longer being used 2017-06-18 23:50:37 -04:00
Alex Liebowitz
4c9715171f Convert metadata fields back to separate state keys
Before, they were stored in one data structure called
this.state.metadata that was supposed to contain (more or less) all the
metadata for the publish, but this was unwieldy and possibly causing
unnecessary updates because not all of the metadata fields correspond
directly to fields in the interface.
2017-06-18 23:50:37 -04:00
Alex Liebowitz
c3973ac780 Finish converting TOS agree checkbox to controlled component 2017-06-18 23:50:37 -04:00
Alex Liebowitz
26e6245b89 Basics of metadata prefill 2017-06-18 23:50:37 -04:00
Alex Liebowitz
8c44dfbb59 Update and simplify state management of metadata fields 2017-06-18 23:50:37 -04:00
Alex Liebowitz
d08790cd5d When updating, don't pre-populate with old data (will pre-fill instead) 2017-06-18 23:50:37 -04:00