You are here

function _collapse_text_filter_settings in Collapse Text 7.2

Implements hook_filter_FILTER_settings().

1 string reference to '_collapse_text_filter_settings'
collapse_text_filter_info in ./collapse_text.module
Implements hook_filter_info().

File

./collapse_text.module, line 41
collapse_text is an input filter that allows text to be collapsible

Code

function _collapse_text_filter_settings($form, &$form_state, $filter, $format, $defaults, $filters) {
  $filter->settings += $defaults;
  $form = array();
  $form['default_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Default title'),
    '#description' => t('If no title is supplied for a section, use this as the default. This may not be empty. The original default title is "@default_title".', array(
      '@default_title' => COLLAPSE_TEXT_DEFAULT_TITLE,
    )),
    '#default_value' => $filter->settings['default_title'],
    '#required' => TRUE,
  );
  $form['form'] = array(
    '#type' => 'checkbox',
    '#title' => t('Surround text with an empty form tag'),
    '#description' => t('Collapse text works by generating <fieldset> tags. To validate as proper HTML, these need to be within a <form> tag. This option allows you to prevent the generation of the surrounding form tag. You probably do not want to change this.'),
    '#default_value' => $filter->settings['form'],
  );
  return $form;
}