Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Readd 'form_label_errors' block to disable errors on form labels#26408

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

Merged
fabpot merged 1 commit intosymfony:3.4frombirkof:readd_form_label_errors
Mar 18, 2018
Merged

Readd 'form_label_errors' block to disable errors on form labels#26408

fabpot merged 1 commit intosymfony:3.4frombirkof:readd_form_label_errors
Mar 18, 2018

Conversation

@birkof
Copy link
Contributor

@birkofbirkof commentedMar 5, 2018
edited
Loading

QA
Branch?3.4
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

Re-addedform_label_errors block on bootstrap 4 form themes.
You can disable errors shown on form labels by simply extend bootstrap4 layout and emptyform_label_errors block. See below:

{% use "bootstrap_4_layout.html.twig" %}{# Disable errors shown on form labels #}{% block form_label_errors %}{% endblock form_label_errors %}

Block previously removedhere by@nicolas-grekas.
cc@Nyholm

veteran29, FabianSchmick, and kanounzied reacted with thumbs up emoji
@Nyholm
Copy link
Member

Thank you for this PR.
I had that block in my initial PR (#24435). I think it is a good way to opt-out form having the errors in the labels. However, I would strongly recommend against opting-out.

Btw, This is afeature and not a bug.

Protip: There is no need of closing the PR and open a new one. Just push your changes to the same branch and the PR will be updated.

@birkof
Copy link
ContributorAuthor

Made the previous pull request in the wrong branch and it collects all the differences & shown as comments... that's why I prefer to close it & open another one.

Thanks!

@Simperfit
Copy link
Contributor

@Nyholm This a is a new feature that we want to introduce in the 3.4 branch, shouldn't it go to master instead ?

@Simperfit
Copy link
Contributor

@birkof Thanks for the first contribution on symfony! ;)

birkof and Nyholm reacted with thumbs up emoji

@Nyholm
Copy link
Member

Okey, Lets consider it a bugfix then. It is for users that does not useform_row. They will have a (real) hard time customizing the the form.

Simperfit and sstok reacted with thumbs up emoji

@ostrolucky
Copy link
Contributor

If somebody needs to do this on per-field basis, this is better approach:

{{ form_label(addUserForm.userByEmail,null, {errors: []}) }}

If you want to disable all errors for form, you can currently do this:

{%form_themeaddUserForm_self %}{%blockform_errors %}{%endblock %}

This PR is still a bit different though, because someone might want to disable errors in labels, but not errors viaform_errors

FabianSchmick and Crovitche-1623 reacted with thumbs up emoji

@Nyholm
Copy link
Member

Exactly. The point is not to disable errors. The point is to disable errorsin labels.

@birkof
Copy link
ContributorAuthor

@ostrolucky didn't know you could disable errors per-field like that. Thanks for the hint!

ostrolucky reacted with heart emoji

@veteran29
Copy link

Asform_errors call was removed fromform_row in thiscommit, will disabling errors in labels cause error blocks to be not rendered at all?

A simple way to restore old behavior could be useful as errors in labels don't play nice with some Bootstrap 4 themes.

Copy link
Member

@NyholmNyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Im 👍

@fabpot
Copy link
Member

Thank you@birkof.

birkof reacted with thumbs up emoji

@fabpotfabpot merged commit5b4354f intosymfony:3.4Mar 18, 2018
fabpot added a commit that referenced this pull requestMar 18, 2018
…orm labels (birkof)This PR was merged into the 3.4 branch.Discussion----------Readd 'form_label_errors' block to disable errors on form labels| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| License       | MITRe-added **form_label_errors** block on bootstrap 4 form themes.You can disable errors shown on form labels by simply extend bootstrap4 layout and empty **form_label_errors** block. See below:```{% use "bootstrap_4_layout.html.twig" %}{# Disable errors shown on form labels #}{% block form_label_errors %}{% endblock form_label_errors %}```Block previously removed [here](b375957#diff-62cb2a10f5a37db0e87e3bd81609b17dR186) by@nicolas-grekas.cc@NyholmCommits-------5b4354f Readd 'form_label_errors' block to disable errors on form labels
This was referencedApr 3, 2018
@fabpotfabpot mentioned this pull requestMay 7, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@NyholmNyholmNyholm approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

8 participants

@birkof@Nyholm@Simperfit@ostrolucky@veteran29@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp