'fieldset', '#tree' => FALSE, '#title' => t('Settings'), ); $form['settings']['emblem'] = array( '#title' => t('Show site emblem'), '#type' => 'checkbox', '#default_value' => isset($settings['emblem']) ? $settings['emblem'] : 1, ); // Build color defaults $themes = list_themes(); $theme_info = !empty($themes['ginkgo']->info) ? $themes['ginkgo']->info : array(); $defaults = array(); foreach (array('site', 'og', 'user') as $type) { // Retrieve default colors from info file if (isset($theme_info["spaces_design_{$type}"])) { $defaults[$type] = $theme_info["spaces_design_{$type}"]; } else { $defaults[$type] = '#3399aa'; } } $form['color'] = array( '#type' => 'fieldset', '#tree' => FALSE, '#title' => t('Color'), '#value' => "
". t('These color settings can be overridden by color customizations per space.') ."
", ); $form['color']['color_site'] = array( '#title' => t('Default site color'), '#type' => 'textfield', '#size' => '7', '#maxlength' => '7', '#default_value' => !empty($settings['color_site']) ? $settings['color_site'] : $defaults['site'], '#suffix' => '
', '#attributes' => array('class' => 'colorpicker'), ); $form['color']['color_og'] = array( '#title' => t('Default group color'), '#type' => 'textfield', '#size' => '7', '#maxlength' => '7', '#default_value' => !empty($settings['color_og']) ? $settings['color_og'] : $defaults['og'], '#suffix' => '
', '#attributes' => array('class' => 'colorpicker'), ); $form['color']['color_user'] = array( '#title' => t('Default profile color'), '#type' => 'textfield', '#size' => '7', '#maxlength' => '7', '#default_value' => !empty($settings['color_user']) ? $settings['color_user'] : $defaults['user'], '#suffix' => '
', '#attributes' => array('class' => 'colorpicker'), ); return $form; }