Skip to content

Commit

Permalink
Preselect correct copyright ID and incorporate changes in edit view
Browse files Browse the repository at this point in the history
Note that the edit view does not preselect a copyright, so as not to override a previously selected value
  • Loading branch information
jazairi committed Dec 9, 2024
1 parent 86836ca commit 0fd79ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/views/thesis/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,13 @@

<%= f.association :license, as: :select,
include_hidden: false,
label: 'License (if you retain copyright)',
label: 'License (if you retain copyright) *',
label_method: :display_description,
label_html: { class: 'col1q' },
wrapper_html: { class: 'field-row select layout-1q3q layout-band' },
input_html: { class: 'field field-select col3q', multiple: false,
aria: { describedby: 'thesis_license-hint' } },
aria: { describedby: 'thesis_license-hint' },
data: { msg: Thesis::VALIDATION_MSGS[:license] } },
hint: 'Not sure what to select? Learn more about <a href="https://chooser-beta.creativecommons.org/" target="_blank">Creative Commons licenses</a>.'.html_safe,
hint_html: { class: 'col3q', id: 'thesis_license-hint' } %>

Expand Down
2 changes: 1 addition & 1 deletion app/views/thesis/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
</div>

<%= f.association :copyright, as: :select,
selected: 1,
selected: 2,
required: true,
collection: Copyright.display_to_author,
validate: { presence: true },
Expand Down

0 comments on commit 0fd79ab

Please sign in to comment.