Commit a6913a75 authored by Tristan Olive's avatar Tristan Olive

Support multiple project preference groups

Fixed an error that was preventing multiple preference group elements from being respected.

(DBOINCP-108)
parent adc006aa
......@@ -542,8 +542,9 @@ function boincwork_generate_prefs_element(&$form, $type, $elements, $user_prefs
$elements = array($elements);
}
foreach ($elements as $key => $element) {
$name = "group_{$key}";
$title = is_array($element['title']) ? $element['title']['@value'] : $element['title'];
$name = str_replace(' ','_',strtolower($title));
$name = "group_{$name}";
$form[$name] = array(
'#title' => t($title),
'#type' => 'fieldset',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment