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

Feature: Add config variable to list provinces before states #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

davejtoews
Copy link

When creating forms for primarily Canadian users it makes sense to list provinces before US states, rather than after. Without this PR I can only do this by feeding the entire list into $default_states or getStates().

This PR allows setting states_first: false to invert the order. It also adds a config value for include_provinces as I presume in most cases a site will configure all instances of the field the same way.

@davejtoews
Copy link
Author

I would have added to the tests to track this feature, but the version of phpunit included does not run in php 8.x.

@jsirish
Copy link
Member

jsirish commented Jul 26, 2023

@davejtoews thanks for the PR!

I've made some updates to the module and rebased your branch. If you still wanted to do write tests, PHPUnit and GitHub Actions are now working.

@davejtoews
Copy link
Author

@jsirish tests have now been added

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

Successfully merging this pull request may close these issues.

None yet

2 participants