UI: show values selected in complex filter input fields (46588) #10780
+18
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a possible fix for 46588. Complex filter inputs (duration and multiselect) still properly show their selected values in ILIAS 9, but at some point that broke due to different refactorings of js binding and form rendering.
The issue is that those input fields lose the js bound to them when they are rendered into their popover in
FilterContextRenderer::renderProxyField, so that theirupdateOnLoadCodeis not executed. My somewhat blunt solution to this is to attach theonLoadCodeto the popover, similar to what is done inField/Renderer::wrapInFormContext. An alternative would be to wrap the input into something similar totpl.context_form.htmlbefore rendering to the filter, but that didn't seem worth the effort to me.Additionally, I also made a few changes to
Duration::getUpdateOnLoadCode, so that dates (with or without time) are not shown as their raw value, but formatted similarly to how they are shown in the datetime picker.