You are here

function oa_core_user_spaces_edit_form in Open Atrium Core 7.2

Edit form for the panel.

1 string reference to 'oa_core_user_spaces_edit_form'
oa_core_user_spaces.inc in plugins/content_types/oa_core_user_spaces.inc
Defines the space summary panels pane.

File

plugins/content_types/oa_core_user_spaces.inc, line 362
Defines the space summary panels pane.

Code

function oa_core_user_spaces_edit_form($form, &$form_state) {
  $conf = $form_state['conf'];
  $form['types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Types to show'),
    '#options' => array(
      OA_SPACE_TYPE => t('Spaces'),
      OA_GROUP_TYPE => t('Groups'),
    ),
    '#default_value' => $conf['types'],
  );
  $form['tabs'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Tabs'),
    '#options' => array(
      SPACE_TAB_FAVORITE => t(SPACE_TAB_FAVORITE),
      SPACE_TAB_ARCHIVED => t(SPACE_TAB_ARCHIVED),
      SPACE_TAB_MEMBERS => t(SPACE_TAB_MEMBERS),
      SPACE_TAB_INHERITED => t(SPACE_TAB_INHERITED),
      SPACE_TAB_ALL => t(SPACE_TAB_ALL),
    ),
    '#default_value' => $conf['tabs'],
  );
  $form['image_size'] = array(
    '#type' => 'radios',
    '#title' => t('Image size'),
    '#options' => array(
      'square' => t('Square'),
      'quarter' => t('Quarter'),
      'half' => t('Half'),
      'full' => t('Full'),
      'none' => t('None'),
    ),
    '#default' => $conf['image_size'],
  );
  $form['show_links'] = array(
    '#title' => t('Show links'),
    '#type' => 'checkbox',
    '#default_value' => $conf['show_links'],
  );
  $form['link_class'] = array(
    '#title' => t('CSS Link class'),
    '#type' => 'textfield',
    '#default_value' => $conf['link_class'],
    '#description' => 'Enter css classes for links, such as btn',
  );
  $form['show_description'] = array(
    '#title' => t('Show description'),
    '#type' => 'checkbox',
    '#default_value' => $conf['show_description'],
  );
  $form['show_sections'] = array(
    '#title' => t('Show sections'),
    '#type' => 'checkbox',
    '#default_value' => $conf['show_sections'],
  );
  $form['num_per_page'] = array(
    '#title' => t('Number per page'),
    '#type' => 'textfield',
    '#default_value' => $conf['num_per_page'],
    '#description' => 'Number per page, zero for all.',
  );
  $form['only_published'] = array(
    '#title' => t('Only show published spaces or groups'),
    '#type' => 'checkbox',
    '#default_value' => !empty($conf['only_published']),
  );
  return $form;
}