Skip to content

Conversation

@drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Jan 7, 2026

Currently when the sets manager page loads the "Import how many sets?" select has "a single set" initially selected and the "Import from where?" select has "Select filenames below" selected. But then if you change the first select to "multiple sets" the "Import from where?" select still has "Select filenames below" selected. Furthermore, if you then click on that select and use shift-down arrow to select multiple sets, that first disabled option stays selected. Then form validation fails for that option since it has no value if you click the "Import" button.

This just makes it so that when you switch from the "Import how many sets?" select from "a single set" to "multiple sets", that first option in the "Import from where?" select is immediately unselected.

There is also a little clean up of this section of JavaScript code. The elements with id import_source_select and name action.import.number are actually the same element, so no need to find them in the DOM twice. Also ensure the elements exist and are found before trying to work with them. More of this is needed in this file, but this is probably good enough for now.

…ed issue.

Currently when the sets manager page loads the "Import how many sets?"
select has "a single set" initially selected and the "Import from
where?" select has "Select filenames below" selected.  But then if you
change the first select to "multiple sets" the "Import from where?"
select still has "Select filenames below" selected.  Furthermore, if you
then click on that select and use shift-down arrow to select multiple
sets, that first disabled option stays selected.  Then form validation
fails for that option since it has no value if you click the "Import"
button.

This just makes it so that when you switch from the "Import how many
sets?" select from "a single set" to "multiple sets", that first option
in the "Import from where?" select is immediately unselected.

There is also a little clean up of this section of JavaScript code.  The
elements with id `import_source_select` and name `action.import.number`
are actually the same element, so no need to find them in the DOM twice.
Also ensure the elements exist and are found before trying to work with
them. More of this is needed in this file, but this is probably good
enough for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant