Use SELECT instead of radio buttons to choose group

Junyor - April 28, 2007 - 19:49
Project:Organic Groups Mandatory Group
Version:5.x-1.0-beta
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

We have a *ton* of groups and using radio buttons to choose the mandatory group just isn't practical. I've switched the settings page to use a SELECT instead.

AttachmentSize
og_man_group.patch1.69 KB

#1

pwolanin - April 29, 2007 - 01:37

Look at the code in og.module- there is a switch between checkboxes and a multi-select based on the number of groups shown (cutoff at 20 I think). Can you code it that way instead?

#2

pwolanin - April 29, 2007 - 01:39
Status:needs review» needs work

Also, what did you take the cehck_plain off the group title? This should be there to prevent XSS.

-    $options[$group->nid] = check_plain($group->title);
+    $options[$group->nid] = $group->title;

#3

pwolanin - April 29, 2007 - 01:44

Though I think perhaps, on second though, it's not needed since the forms API already runs a check_plain() on all the options.

#4

Junyor - May 9, 2007 - 01:53

The check_plain was mangling group titles containing double quotes, if I'm not mistaken. It was turning them into HTML entities.

#5

pwolanin - May 9, 2007 - 15:31

Ok, can you submit a patch with the swtich between checkboxes and multi-select based on # of groups?

#6

Junyor - May 9, 2007 - 15:42

Yes, I will, but it may be a couple weeks.

#7

MGParisi - April 2, 2008 - 16:56

+1 to this, I need this functionality

#8

pwolanin - April 2, 2008 - 22:55

I'm waiting for the patch...

#9

Junyor - April 2, 2008 - 22:58

FYI, I'm no longer working on the project that used this functionality and I don't plan to update the attached patch.

 
 

Drupal is a registered trademark of Dries Buytaert.