We should have a default country and an admin setting. The admin setting would control what is given as a default if the user's country is not installed. Either (a) global (no country) or (b) the default country.

Comments

nedjo’s picture

Added ability to set default country.

nedjo’s picture

Need to require a default country if a country is installed. Follow approaches in locale.inc.

nedjo’s picture

Status: Active » Needs work
nedjo’s picture

Changes needed (following locale module handling of languages where similar handling exists):

1. First country created is automatically the default. (Locale not applicable, since English is installed by default.)

2. Enabled checkbox is locked for the default country.

3. Handling in the submit handler to pass 'enabled' value through for disabled checkbox.

4. Delete handling.

nedjo’s picture

Priority: Normal » Critical
nedjo’s picture

Status: Needs work » Needs review

Committed a set of fixes. Needs more testing.

catch’s picture

I added a check to http://d6.6/admin/settings/country-code-country/%country to disable the checkbox and add a description if it's the default - since you could disable the default country from there despite it being prevented in the overview.

Couple of possible follow-ons, both minor IMO:

1. Do we want to hide delete links for the default country?
2. When there's only one country available should this be the default?
3. If yes to 2 and 3, how do we remove a country if there's only one? (since it'd be impossible to remove it as the default, or disable it)

catch’s picture

Status: Needs review » Fixed

This is now in site_country module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.