-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
bootstrap 3 layout adds "form-control" on hidden inputs / csrf token inputs #16925
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@michaelPf85 It would be great if you could point us to some Bootstrap documentation which explain when to use and when not to use the |
That's a challenge... Precise Bootstrap documentation ! Up to now I've found those :
It never exactly tells in Bootstrap that |
@michaelPf85 thanks for investigating the origin of this recommendation. @xabbuh given these proofs, I'd say that the change is legitimate. |
Seems so. Are there other types we should exclude too? |
Here is the complete list of input types where the Date and datetime seem to be covered by oher blocks, but I do not know what
|
It looks like
The |
@michaelPf85 thanks for the information provided to solve this issue and thanks to @satanasdiabolo too. I've created a new pull request to solve this issue (#17568). @michaelPf85 you mentioned in your first comment that this would be your first pull request. If you want to try to submit a pull request next time, you can read this guide and you can ask us for any help that you might need. |
…iluz) This PR was squashed before being merged into the 2.7 branch (closes #17568). Discussion ---------- Improved Bootstrap form theme for hidden fields | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16925 | License | MIT | Doc PR | - Commits ------- ba5d7f9 Improved Bootstrap form theme for hidden fields
Hello,
I've been using Bootlint recently to fix some mistakes on an application we're building. Most errors were on our side and we were able to fix, but one seems to come from symfony : Bootlint complains that our "form__token" hidden inputs use "form-control" class that is only available for text inputs.
I think this is the CSRF token input that SF automatically adds, I might be wrong on some point or term.
I located in bootstrap_3_layout.html.twig the block form_widget_simple that adds the "form-control" class on everything but "file" inputs. I modified it from
or file != type
toor ('file' != type and 'hidden' != type)
and it works well. But I'm afraid this could miss some other errors, but other widgets seem to cover about everything (date, datetime, money...), or worse it could not be wanted :)Would this be alright ? I suppose I might try to write some pull request if it's OK (this would be my first).
We're using Symfony 2.6.12 but I checked the master branch and this part was not changed.
Thanks for your feedback.
The text was updated successfully, but these errors were encountered: