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
[Checkout] Prevent extra fields when login in on addressing page #15435
Merged
jakubtobiasz
merged 4 commits into
Sylius:1.12
from
Jibbarth:fix/login-addressing-submit-extra-fields
Dec 12, 2023
Merged
[Checkout] Prevent extra fields when login in on addressing page #15435
jakubtobiasz
merged 4 commits into
Sylius:1.12
from
Jibbarth:fix/login-addressing-submit-extra-fields
Dec 12, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bunnyshell Preview Environment deletedAvailable commands:
|
vvasiloi
previously requested changes
Dec 1, 2023
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.
Hey @Jibbarth, thanks for your contribution! I left some feedback. Could you also add a test for it?
src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
Outdated
Show resolved
Hide resolved
vvasiloi
reviewed
Dec 1, 2023
src/Sylius/Bundle/CoreBundle/Resources/translations/validators.fr.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Victor Vasiloi <victor.vasiloi@gmail.com>
Thanks for the review @vvasiloi. I will try to make a test 🤞 |
NoResponseMate
added
Shop
ShopBundle related issues and PRs.
Bug
Confirmed bugs or bugfixes.
labels
Dec 11, 2023
NoResponseMate
approved these changes
Dec 12, 2023
jakubtobiasz
approved these changes
Dec 12, 2023
Thank you, @Jibbarth! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refs video in #15183
When we login in addressing page after submit once the page, the reload process after login resubmit data, and keep sending
form[customer][email]
, that it doesn't be added in form.So I unset these data on pre-submit.
I also change the csrf_error message for something more "understandable".
By this way, we can still have previous submitted data for address fields.
The other way, suggested by @Wojdylak, is to change this line https://github.com/Sylius/Sylius/blob/1.12/src/Sylius/Bundle/UiBundle/Resources/private/js/sylius-api-login.js#L50
by
But using it, all already filled data are lost.
WDYT ? Would it be acceptable to lose such data, or should we keep them ?