We want very fine control over various features in our groups. (We have 5 different content types in the group and we want to a role for each.) We want group admins to be able to defined which roles are enabled by default.

The problem is that the "Default role for new members" field is a single-select field. It being rendered as a multi-select or a list of checkboxes would be great!

I tried to do this with hook_form_alter -- simply setting #multiple to TRUE, but this didn't work.

CommentFileSizeAuthor
#1 og_user_roles-MANY-DEFAULT-ROLES.zip31.18 KBcapellic

Comments

capellic’s picture

StatusFileSize
new31.18 KB

I spent a good chunk of time researching this and decided that the module would need an overhaul for this to work. To go from a single value setting to a non-to-many was no easy task.

The results of my overhaul are attached. No, it's not a proper patch submission - I first want to get an understanding from the maintainer if this is a patch that is desired.

In the attached zip:

1. The original files have the "ORIG" suffix. (This is based on the 6.x-4.1 version.)
2. The database table changes required me removing the primary key and instead using a key across all fields. While those changes have been made to the install file, no other changes have -- beware.
3. I have not made any changes to files in the test directory.

If someone wants to run with this and get the install file shaped up and also update the testing files, that would be great. As for an upgrade path, data shouldn't be a problem. I think all that's needed is what I've done in #2 above.