-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle states_required? in admin address component
Previously, this component would just disable the state_id field when the selected country did not require states, but this meant that the user would never be able to self-fill the state_name field, which is something that some stores can require with the `Spree::Config[:address_requires_state]` preference. The component now takes this into account and will swap between a state_id dropdown select field, or a blank state_name text input depending on the country the user has selected. This brings this new admin component up to par with the previous backend address forms.
- Loading branch information
1 parent
7593683
commit d46369f
Showing
2 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
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
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