'group_tools_presets', 'value' => '1')); // new group can choose from preset (if any) if (empty($entity) && !empty($presets)) { echo elgg_view("output/longtext", array("value" => elgg_echo("group_tools:create_group:tool_presets:description"))); $preset_selectors = ""; $preset_descriptions = ""; $presets_tools = array(); foreach ($presets as $index => $values) { $preset_selectors .= elgg_view("output/url", array( "text" => elgg_extract("title", $values), "href" => "#", "class" => "elgg-button elgg-button-action mrm", "rel" => $index, "title" => elgg_strip_tags(elgg_extract("description", $values)), )); $preset_tools = elgg_extract("tools", $values); foreach ($preset_tools as $tool_name => $tool) { if ($tool == "yes") { $presets_tools[$tool_name][] = "group-tools-preset-" . $index; } } $preset_descriptions .= ""; } // blank preset $preset_selectors .= elgg_view("output/url", array( "text" => elgg_echo("group_tools:create_group:tool_presets:blank:title"), "href" => "#", "class" => "elgg-button elgg-button-action mrm", "rel" => "blank" )); $preset_descriptions .= ""; echo ""; echo "
" . $preset_selectors . "
"; echo "
" . $preset_descriptions . "
"; $more_link = elgg_view("output/url", array( "text" => elgg_echo("group_tools:create_group:tool_presets:show_more"), "href" => "#group-tools-preset-more", "rel" => "toggle", "class" => "float-alt" )); echo elgg_view_module("info", elgg_echo("group_tools:create_group:tool_presets:active_header"), $more_link, array("id" => "group-tools-preset-active", "class" => "hidden")); $tools_content = ""; foreach ($tools as $group_option) { $group_option_toggle_name = $group_option->name . "_enable"; $value = "no"; $options = array( "group_tool" => $group_option, "value" => $value, "class" => "mbm" ); if (array_key_exists($group_option_toggle_name, $presets_tools)) { $options["class"] .= " " . implode(" ", $presets_tools[$group_option_toggle_name]); } $tools_content .= elgg_view("group_tools/elements/group_tool", $options); } echo elgg_view_module("info", elgg_echo("group_tools:create_group:tool_presets:more_header"), $tools_content, array("id" => "group-tools-preset-more", "class" => "hidden")); ?> label, $b->label);')); foreach ($tools as $group_option) { $group_option_toggle_name = $group_option->name . "_enable"; $value = elgg_extract($group_option_toggle_name, $vars); echo elgg_view("group_tools/elements/group_tool", array("group_tool" => $group_option, "value" => $value)); } } ?>