-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Remaining changes for bootstrap 4 file fields #27958
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
Conversation
Also I changed the previous fake-id from |
@@ -119,7 +119,7 @@ | |||
<{{ element|default('div') }} class="custom-file"> | |||
{%- set type = type|default('file') -%} | |||
{{- block('form_widget_simple') -}} | |||
<label for="{{ form.vars.id }}" class="custom-file-label">Choose File</label> | |||
<label for="{{ form.vars.id }}" class="custom-file-label">{{ attr.placeholder | default("") }}</label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attr.placeholder|default('')
for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also it should be translatable i guess 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the inconsistency (my tunnel vision was strong there I guess).
I want to answer it here, as this is an important point and I don't want to discuss it in a collapsed code comment. I thought about that as well, but as the default placeholder ( |
@apfelbox AFAIK we're already translating placeholders, ... and title attributes for that matter: symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig Lines 426 to 427 in 4ee4898
symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig Lines 63 to 65 in 4ee4898
|
WELL… updated. 😅 |
im guessing some composer constraint needs a bump for tests to pass :) |
The |
Thank you @apfelbox. |
…lbox) This PR was merged into the 4.1 branch. Discussion ---------- [Form] Remaining changes for bootstrap 4 file fields | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | — | License | MIT | Doc PR | — Hi again, This is a follow-up PR for #27919 Apparently I talked about it in the previous PR, but forgot to actually push the change. Sorry about that! 😞 This PR no actually adds this instead of just talking about it:  Sorry again, just forgot to actually update the last PR. Commits ------- 3cd2eef Add placeholder support in bootstrap 4 file fields
…s (apfelbox) This PR was merged into the 4.1 branch. Discussion ---------- [Form] Remaining changes for bootstrap 4 file fields | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | — | License | MIT | Doc PR | — Hi again, This is a follow-up PR for symfony#27919 Apparently I talked about it in the previous PR, but forgot to actually push the change. Sorry about that! 😞 This PR no actually adds this instead of just talking about it:  Sorry again, just forgot to actually update the last PR. Commits ------- 3cd2eef Add placeholder support in bootstrap 4 file fields
… in bootstrap 4 (MrMitch) This PR was merged into the 4.1 branch. Discussion ---------- [Form] Remove extra .form-group wrapper around file widget in bootstrap 4 | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a This is a follow-up to #27958 and #27919 by @apfelbox . It fixes an extra space between the help text of a FileType widget and the widget itself. The extra space was caused by a `.form-group` wrapper in the `file_widget` block. Commits ------- 01e7fe4 [Form] Remove extra .form-group wrapper around file widget in bootstrap 4
…ap 4 This is a follow-up to symfony/symfony#27958 and symfony/symfony#27919. It fixes an extra space between the help text of a FileType widget and the widget itself. The extra space was cause by a .form-group wrapper in the file_widget block.
Hi again,
This is a follow-up PR for #27919
Apparently I talked about it in the previous PR, but forgot to actually push the change. Sorry about that! 😞
This PR no actually adds this instead of just talking about it:
Sorry again, just forgot to actually update the last PR.