Skip to content
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

Fix: display errors in reset template #1180

Merged
merged 1 commit into from
Jun 12, 2020
Merged

Fix: display errors in reset template #1180

merged 1 commit into from
Jun 12, 2020

Conversation

clementlefrancois
Copy link
Contributor

Subject

Currently the reset form do not display errors message.
I have added a line after the form widget for display errors messages.
The best would be to replace form widget with a form row to display bootstrap template.

I am targeting this branch, because this is a bug fix.

Closes #1179

Changelog

### Fixed
- Fixed display errors in reset template

fancyweb
fancyweb previously approved these changes Jun 11, 2020
Copy link
Contributor

@fancyweb fancyweb left a comment

Choose a reason for hiding this comment

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

form_errors is after form_widget as in the base bootstrap form template.
Also we don't need to add the form_errors call on the other field, since errors for repeated fields are always mapped to the first field.

@core23 core23 added the patch label Jun 11, 2020
@@ -48,6 +48,7 @@ file that was distributed with this source code.
'class': 'form-control',
'placeholder': 'form.new_password'|trans({}, 'FOSUserBundle')
}}) }}
{{ form_errors(form.plainPassword.first) }}
Copy link
Member

Choose a reason for hiding this comment

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

Please add this for the second as well

Copy link
Contributor

Choose a reason for hiding this comment

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

I think there is not need, check RepeatedTypeValidatorExtension.

Copy link
Member

Choose a reason for hiding this comment

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

It depends, what other validation was added by the developer.

Currently the reset form do not display errors message.
I have added a line after the form widget for display errors messages.
The best would be to replace form widget with a form row to display bootstrap template.
@jordisala1991 jordisala1991 requested review from core23 and a team June 12, 2020 11:17
@jordisala1991 jordisala1991 merged commit 2eb8852 into sonata-project:4.x Jun 12, 2020
@jordisala1991
Copy link
Member

Thank you @clementlefrancois

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error messages do not display on the password reset page
4 participants