Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[TwigBridge] Fix HTML for translatable custom-file label in Bootstrap 4 theme#40980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedApr 28, 2021
Hey! To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done? Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review. Cheers! Carsonbot |
src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
… 4 themeBootstraps allows to translate the label of the button of a custom-fileinput with SCSS variables depending on the lang attribute of the*input*.This attribute was set on the label instead and thus had no effect.
nicolas-grekas commentedMay 7, 2021
Thank you@acran. |
Bootstrap allows to translate/change the label of the upload button of a
custom-fileinput via SCSS, seeBootstrap docs:This works by generating the following CSS which depends on the
langattribute of the input:This however currently does not work with the HTML generated by the theme since the resulting HTML is of the form (redacted here to the relevant parts):
while it should be of the form
i.e. the
langwas placed on thelabelinstead of theinput.This PR fixes this to be compatible with Bootstrap 4.