You are here

function panopoly_widgets_configure_form in Panopoly Widgets 7

Configuration Form for Panopoly Magic

1 string reference to 'panopoly_widgets_configure_form'
panopoly_widgets_apps_app_info in ./panopoly_widgets.module
Implements hook_apps_app_info()

File

./panopoly_widgets.module, line 41

Code

function panopoly_widgets_configure_form($form, &$form_state) {
  $form = array();
  $file_extensions = variable_get('panopoly_widgets_file_extensions', PANOPOLY_WIDGETS_FILE_EXTENSIONS_DEFAULT);
  $file_extensions = str_replace(' ', ', ', $file_extensions);
  $form['panopoly_widgets_file_extensions'] = array(
    '#title' => t('Allowed file extensions in file widgets.'),
    '#type' => 'textfield',
    '#default_value' => $file_extensions,
    '#element_validate' => array(
      '_file_generic_settings_extensions',
    ),
    '#description' => t('Separate extensions with a space or comma and do not include the leading dot.'),
  );
  $form['panopoly_widgets_spotlight_pause_play_buttons'] = array(
    '#title' => t('Add pause/play button to all spotlight widgets.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('panopoly_widgets_spotlight_pause_play_buttons', 1),
    '#description' => t('The button will appear under to the slide numbers. Helps with accessibility.'),
  );
  $form = system_settings_form($form);
  $form['#submit'][] = 'panopoly_widgets_configure_form_submit';
  return $form;
}