You are here

function oa_appearance_oa_settings_form in Open Atrium Appearance 7.2

Implements hook_oa_settings_form().

File

./oa_appearance.module, line 136
Provides integration between Open Atrium and Colorizer module

Code

function oa_appearance_oa_settings_form(&$form_state) {
  $forms = array();
  $form = array();
  $form['oa_mainmenu'] = array(
    '#type' => 'checkbox',
    '#title' => 'Show main menu (if it has items)',
    '#default_value' => variable_get('oa_mainmenu', TRUE),
  );
  $form['oa_menu_banner'] = array(
    '#type' => 'checkbox',
    '#title' => 'Show Site banner next to main menu',
    '#default_value' => variable_get('oa_menu_banner', TRUE),
  );
  $form['oa_breadcrumb_menu'] = array(
    '#type' => 'checkbox',
    '#title' => 'Replace Breadcrumb toolbar with main menu',
    '#default_value' => variable_get('oa_breadcrumb_menu', FALSE),
  );
  $forms[] = array(
    'caption' => t('Menus'),
    'form' => $form,
  );
  $form = array();
  $form['oa_site_banner_file'] = array(
    '#title' => t('Site banner image'),
    '#type' => 'managed_file',
    '#description' => t('The uploaded image will be displayed across the full width of the site.'),
    '#default_value' => variable_get('oa_site_banner', ''),
    '#upload_location' => 'public://',
    '#element_validate' => array(
      'oa_appearance_banner_validate',
    ),
  );
  $form['oa_site_banner_position'] = array(
    '#type' => 'select',
    '#options' => array(
      0 => 'Hidden',
      1 => 'Above toolbar',
      2 => 'Below toolbar',
    ),
    '#title' => 'Banner Position',
    '#empty_option' => '--Banner Position--',
    '#default_value' => variable_get('oa_site_banner_position', 0),
  );
  $form['oa_banner_stretch'] = array(
    '#type' => 'checkbox',
    '#title' => 'Stretch Banner',
    '#default_value' => variable_get('oa_banner_stretch', FALSE),
  );
  $form['oa_banner_default'] = array(
    '#type' => 'checkbox',
    '#title' => 'Use Default Banner',
    '#default_value' => variable_get('oa_banner_default', TRUE),
  );
  $form['oa_banner_sitename'] = array(
    '#type' => 'checkbox',
    '#title' => 'Show site name',
    '#default_value' => variable_get('oa_banner_sitename', TRUE),
  );
  $form['oa_banner_siteslogan'] = array(
    '#type' => 'checkbox',
    '#title' => 'Show site slogan',
    '#default_value' => variable_get('oa_banner_siteslogan', FALSE),
  );
  $forms[] = array(
    'caption' => t('Banners'),
    'form' => $form,
    'submit' => 'oa_appearance_banner_submit',
  );
  return $forms;
}