OG_Subgroups currently provides select form elements on the node add\edit pages for setting the parents and members, while OG.module offers checkboxes for setting the audience. This is inconsistent on the part of OG_Subgroups and select boxes can be confusing to lass savvy users who don't know to ctrl+click to select multiple values.

I propose we change these elements to checkboxes as implemented in the attached patch.

CommentFileSizeAuthor
og_subgroups_checkboxes.patch1.14 KBezra-g

Comments

swood’s picture

Actually, OG uses checkboxes unless the count of options is greater than 20 in which case it uses a multi-select box. This keeps the page from getting so large, especially with a large volume of users or defined groups.

I would suggest that we follow the same line of logic. The value of 20 is arbitrary and we could make it soft, but it it would prevent the checkbox list from growing too large. The following code is modified to use the og style.

  $type = count($options) >= 20 ? 'select' : 'checkboxes';
  return array(
    '#type' => $type,
    '#title' => t('Members'),
    '#default_value' => $selected,
    '#options' => $options,
    '#description' => 'Anyone who is an immediate member of the group.  Members of subgroups need not be checked.',
    '#multiple' => 1,
    '#size' => $multiple ? min(9, count($options)) : 0,
    '#weight' => 0,
  );
ezra-g’s picture

Status: Needs review » Closed (fixed)

Swood committed this as well in revision 1.9 last May. Closing.

ezra-g’s picture

Status: Closed (fixed) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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