Sylius/features
Jacob Tobiasz f12a530c7f
bugfix #15435 [Checkout] Prevent extra fields when login in on addressing page (Jibbarth)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A   |
|-----------------|-----|
| Branch?         | 1.12 |
| Bug fix?        | yes |
| New feature?    | no |
| BC breaks?      | no |
| Deprecations?   | no |
| Related tickets | fixes #15183 |
| License         | MIT |

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.

![image](https://github.com/Sylius/Sylius/assets/3168281/e53f0c5a-8fe7-4bd7-81b9-021eb8d819b7)

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 
```
window.location = window.location.href;
``` 

But using it, all already filled data are lost.

WDYT ? Would it be acceptable to lose such data, or should we keep them ? 

Commits
-------
  [Checkout] Prevent extra fields when login in on addressing page
  Update src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
  Add tests that form doesn't display Extra fields error after login in checkout
  Remove fr translation
2023-12-12 10:54:06 +01:00
..
account [Order] Prevent paying with a disabled method 2023-04-03 10:37:59 +02:00
addressing [Behat][Admin][Country] Validation of saving duplicated province names 2023-08-25 08:40:12 +02:00
admin Fix misleading signing in the admin panel feature description 2023-06-22 10:22:47 +02:00
cart Adjust scenarios to use less technical language 2023-07-17 20:03:19 +02:00
channel Merge branch '1.11' into 1.12 2022-11-29 08:36:42 +01:00
checkout Add tests that form doesn't display Extra fields error after login in checkout 2023-12-09 12:05:37 +01:00
cli [maintenance]Prepare postgresql pipeline by making behat scenarios de-case-sensitive 2022-06-03 10:37:44 +02:00
contact transformer for logged in customers added 2022-06-01 14:44:33 +02:00
currency [Behat] Improve scenarios to work with case sensitive PostgreSQL 2022-08-10 07:17:43 +02:00
customer Add last fixes for test and implementation 2021-05-06 10:45:12 +02:00
homepage Move Behat scenarios and implementation 2022-08-01 11:27:04 +02:00
installer [Behat][Installation] Fix behats 2017-10-10 10:51:43 +02:00
inventory Prevent the cart recalculation when the form has errors 2023-03-21 13:52:11 +01:00
locale [Locale][API] Additional locale code validation 2023-03-24 15:39:56 +01:00
order/managing_orders Fix product name's casing in the Behat scenario 2023-12-05 11:15:44 +01:00
payment Describe redirect issue with the Behat scenario 2022-07-21 16:53:28 +02:00
product [Maintenance] Fix postgres behats 2023-12-05 11:27:32 +01:00
promotion Prevent removing taxon if it is already used in promotion rule 2023-09-15 08:49:37 +02:00
shipping [Behat][Admin] Describe how the channel validation indicators work 2022-07-19 12:38:18 +02:00
taxation [Behat] Change step name for configuring tax calculation strategy on channel 2023-08-01 09:21:41 +02:00
taxonomy/managing_taxons [Maintenance] Fix postgres behats 2023-12-05 11:27:32 +01:00
user [Behat][Admin] Cover validation errors while adding a new avatar 2023-07-28 11:27:22 +02:00