Open arraypress opened 7 years ago
This is a small fix, but the span <span class="info-item" data-key="line2"></span>
shows (and occupies space) even when no address line is present. This more than likely applies to other empty address fields as well.
We can improve that output for sure. The reason those fields show and are blank is because of the way our 'Edit' work flow executes on fields that are output there. It does a swap of fields to change from the span
to the input
when someone clicks on the Edit Customer
button.
By having them there, it makes it possible for us to swap them from edit to display mode and back without any issues. We can look at ways to improve that, but we need to maintain some sort of existence of the fields for the JS to work, or we need to change the JS.
@cklosowski, I have submitted two associated PR fixes for this: #6131 and #6130.
I have also fixed a bug where manually edited state names weren't displayed and editable.
Just discovered another bug with #6131, let me investigate.
Fixed! Was missing a parameter on my own function! :)
Discovered a non-related bug with the AJAX population of the states, out with my contributions above (tested on fresh install).
If you edit a customer, select a country, the states are populated correctly. However if you select another country with pre-populated states the list shows the existing countries states. I will post an issue for this.
@davidsherlock That sounds more like a bug with Chosen instead of the actual AJAX result? Does the console show the correct request being made?
The EDD customer view screen only shows the abbreviated ISO codes for both the state and country address fields, which is confusing and unintuitive when viewing customer records. For example, a Spanish customer shows like this:
Since most people won't know these codes off by heart, it would be more usable to have the full state and country name shown.