Commit 671efa1
committed
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.1 parent 694d3e5 commit 671efa1
File tree
4 files changed
+11
-4
lines changed- app
- assets/javascripts
- models
- views/thesis
4 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
0 commit comments