better_formats_settings.admin.inc 1.49 KB
Newer Older
dragonwize's avatar
dragonwize committed
1
<?php
dragonwize's avatar
dragonwize committed
2
3
4
5
6
7
8
9
10
// $Id$

/**
 * @file
 * Contains FAPI and theme functions for the format settings form.
 */

/**
 * FAPI form builder for admin/settings/filters/settings page.
dragonwize's avatar
dragonwize committed
11
 *
dragonwize's avatar
dragonwize committed
12
13
 * @see better_formats_menu()
 */
dragonwize's avatar
dragonwize committed
14
15
function better_formats_settings_admin_form() {
  $form = array();
dragonwize's avatar
dragonwize committed
16

17
  $form['display'] = array(
dragonwize's avatar
dragonwize committed
18
19
20
    '#type' => 'fieldset',
    '#title' => t('Display'),
  );
21
  $form['display']['better_formats_fieldset_title'] = array(
dragonwize's avatar
dragonwize committed
22
23
24
    '#type'  => 'textfield',
    '#default_value' => variable_get('better_formats_fieldset_title', ''),
    '#title' => t('Selection title'),
25
    '#description' => t('Change the format selection title. Defaults to "Input format"'),
dragonwize's avatar
dragonwize committed
26
  );
27
  $form['display']['better_formats_long_tips_link_text'] = array(
28
29
    '#type'  => 'textfield',
    '#default_value' => variable_get('better_formats_long_tips_link_text', ''),
30
    '#title' => t('More format tips link text'),
31
32
    '#description' => t('Change the format full tips link text. Defaults to "More information about formatting options"'),
  );
dragonwize's avatar
dragonwize committed
33
34


35
  $form['control'] = array(
dragonwize's avatar
dragonwize committed
36
37
38
    '#type' => 'fieldset',
    '#title' => t('Control'),
  );
39
  $form['control']['better_formats_per_node_type'] = array(
dragonwize's avatar
dragonwize committed
40
    '#type'  => 'checkbox',
41
    '#title' => t('Control formats per node type'),
42
    '#description' => t('Control formats allowed and default formats per node type. Global settings will be used until a content type admin page is saved.'),
dragonwize's avatar
dragonwize committed
43
44
    '#default_value' => variable_get('better_formats_per_node_type', 0),
  );
dragonwize's avatar
dragonwize committed
45

dragonwize's avatar
dragonwize committed
46
  return system_settings_form($form);
47
}