Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make requested changes to the copyright and license fields
Why these changes are being introduced: Stakeholders have requested that we preselect the 'author' copyright value, and make the license field conditionally required when that copyright value is selected. Relevant ticket(s): * [ETD-627](https://mitlibraries.atlassian.net/browse/ETD-627) How this addresses that need: This adds the `selected` property to the desired option in the copyright field. It also updates the `conditionalLicenseField` function to toggle the `required` property on the license field when it is shown or hidden. Side effects of this change: * Past experience has made me wary of toggling the `required` prop in this way. However, it is generally reliable under a single binary condition (either the 'Author' copyright value is selected, or it isn't). I haven't noticed any issues in click-testing. * `selected` is tied to a value, so in this case we are preselecting the first option. This corresponds to 'Author' in both staging and prod, but it would be better to make an explicit association. If the data were to change order somehow, the wrong copyright holder could be preselected.
- Loading branch information