Fix: Conditional Attribute Binding for the multiple Attribute in the File Selector Fragment #1665
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.
Description
Previous State:
The
multiple
attribute in the<input>
element of the file selector fragment was statically defined, meaning it was either always present or always absent, regardless of the actual requirement. There was no way to dynamically set this attribute based on themultiple
variable managed in the JavaScript code.Fix:
This fix introduces conditional binding for the
multiple
attribute using Thymeleaf, based on the value of themultiple
variable in the JavaScript. As a result, the attribute is only added ifmultiple
is set totrue
, making the file selector's behavior dynamic and more flexible.Checklist:
Contributor License Agreement
By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under the MPL 2.0 (Mozilla Public License Version 2.0) license.
(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)