Fix language and licence selection in EventDetails tab#1479
Fix language and licence selection in EventDetails tab#1479jduehring merged 2 commits intoopencast:r/18.xfrom
Conversation
|
Use Run test server using develop.opencast.org as backend: Specify a different backend like stable.opencast.org: It may take a few seconds for the interface to spin up. |
|
This pull request is deployed at test.admin-interface.opencast.org/1479/2025-11-19_11-47-04/ . |
There was a problem hiding this comment.
This works and can be merged now.
There is still an issue where the dropdown for the language field shows the languages in the currently selected UI language but the filtering is happening based on the english word.
I.e. if the Admin UI is set to german, the dropdown shows the "german" option as "Deutsch", but typing "de" won't produce any suggestion. You still need to type "ge" to get the "Deutsch" option. But I'd suggest that should be fixed in another PR.
| options={ | ||
| metadataField.collection | ||
| ? metadataField.collection.map(item => ({ | ||
| label: item.label ?? item.name, | ||
| value: item.value, | ||
| order: item.order, | ||
| })) | ||
| : [] | ||
| } |
There was a problem hiding this comment.
you can also do
| options={ | |
| metadataField.collection | |
| ? metadataField.collection.map(item => ({ | |
| label: item.label ?? item.name, | |
| value: item.value, | |
| order: item.order, | |
| })) | |
| : [] | |
| } | |
| options={metadataField.collection?.map(option => ({ | |
| ...option, | |
| label: option.label ?? option.name, | |
| }))} |
but it's functionally equivalent, so not super necessary to change.
Fixes #1471 .
I think in #1375 the options field for non series fields has been missed and wasn't parsed at all. This resulted in no language or licence options showing up in the dropdown.
This patch reintroduces the parsing of the options for those fields.
How to test this patch
With the patch installed, open the event details / new event tab and check if you can see and select language, licence and series options in the dropdown selection.