You are here

function wysiwyg_template_form_node_type_form_alter in Wysiwyg API template plugin 7.2

Same name and namespace in other branches
  1. 8.2 wysiwyg_template.module \wysiwyg_template_form_node_type_form_alter()
  2. 3.0.x wysiwyg_template.module \wysiwyg_template_form_node_type_form_alter()

Implements hook_form_FORM_ID_alter().

File

./wysiwyg_template.module, line 489
Makes TinyMCE Templates available as plugin for client-side editors integrated via Wysiwyg API.

Code

function wysiwyg_template_form_node_type_form_alter(&$form, &$form_state, $form_id) {
  $type = $form['#node_type']->type;
  $form['wysiwyg_template'] = array(
    '#type' => 'fieldset',
    '#title' => t('Wysiwyg Template'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#group' => 'additional_settings',
  );
  $form['wysiwyg_template']['wysiwyg_template_default'] = array(
    '#type' => 'select',
    '#title' => t('Default template for this content type'),
    '#options' => wysiwyg_template_load_all($type, TRUE, TRUE),
    '#default_value' => wysiwyg_template_load_default($type),
  );
  $form['#submit'][] = 'wysiwyg_template_form_node_type_form_submit';
}