You are here

function fullcalendar_legend_content_type_edit_form in FullCalendar 7.2

Implements MODULE_PLUGIN_content_type_edit_form().

1 string reference to 'fullcalendar_legend_content_type_edit_form'
fullcalendar_legend.inc in fullcalendar_legend/plugins/content_types/fullcalendar_legend.inc

File

fullcalendar_legend/plugins/content_types/fullcalendar_legend.inc, line 41

Code

function fullcalendar_legend_content_type_edit_form($form, &$form_state) {
  if (empty($form_state['display'])) {
    return $form;
  }
  $conf = $form_state['conf'];
  $form['legend_type'] = array(
    '#type' => 'select',
    '#title' => t('Legend type'),
    '#options' => array(
      'bundle' => t('Bundle'),
      'taxonomy' => t('Taxonomy'),
    ),
    '#default_value' => isset($conf['legend_type']) ? $conf['legend_type'] : '',
    '#description' => t('Select the type of legend to display.'),
  );
  $form['view'] = array(
    '#type' => 'select',
    '#title' => t('FullCalendar view'),
    '#description' => t('Select the associated calendar'),
    '#options' => _fullcalendar_legend_get_views_panes($form_state['display']),
    '#default_value' => isset($conf['view']) ? $conf['view'] : '',
  );
  return $form;
}