There's a huge multiselect field in admin/settings/address that allows admins choose which countries are to be enabled.

This is a bit hard to use when reviewing the list of enabled countries. Maybe if it was a filed of type 'checkboxes' could help.

Otherwise, big thanks for this module. Pretty useful. :)

Comments

AlexisWilke’s picture

markus petrux,

My comment in that regard is that the list of check boxes will be really long. Maybe if we were to create a separate settings window then it would be okay (i.e. Addresses Country Settings).

brmassa’s picture

Status: Active » Closed (works as designed)

Guys,

i definitely dont like the current select box, but i must agree with Alexis that checkboxes would make a HUGE and confusing list.

Im marking this issues as "by design" but i would love to see alternatives.

regards to all,

massa

markus_petrux’s picture

Ok, just to let you know what I'm doing, as it may be useful for someone else. :)

I created a custom module myhacks.module, and here I'm doing the following:

/**
 * Implementation of hook_form_alter().
 */
function myhacks_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == '_addresses_settings') {
    if (isset($form['addresses_country_list'])) {
      drupal_add_css(drupal_get_path('module', 'myhacks') .'/css/addresses-settings.css');
      $form['addresses_country_list']['#type'] = 'checkboxes';
    }
  }
}

...and my file addresses-settings.css contains the following:

#-addresses-settings .form-checkboxes .form-item {
  display: block;
  float: left;
  width: 300px;
}
#-addresses-settings .description {
  clear: both;
}

That is, the multi-selectelement for countries is changed to checkboxes, and the CSS stuff floats the to the left. On a window at 1280x1024 resolution, I get 3 columns, so the whole list of countries is not so long.

Cheers

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke
Status: Closed (works as designed) » Fixed

I'm changing this to Fixed as I'm adding this interesting functionality in my Addresses Extras module.

That way people can select this module and it will work.

Thank you to Markus.
Alexis Wilke

AlexisWilke’s picture

One note about this module:

In order to unselect all countries and select just a few, say US, Canada, or European countries, etc. that's a bit tedious!

Thank you.
Alexis Wilke

markus_petrux’s picture

hmm... good idea. I just opened a "task" in the Checkall issues queue to see if the author could provide such a tool.

#335246: Porting checkall to D6 to optionally enhance "checkboxes" FAPI elements?

markus_petrux’s picture

FYI: I just uploaded a ZIP with a working example to implement "check all / uncheck all" for chechboxes that have more than 10 elements.

http://drupal.org/node/335246#comment-1112105

Status: Fixed » Closed (fixed)

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