summaryrefslogtreecommitdiffstats
path: root/better_formats_settings.admin.inc
blob: fbef3945193ea18c1050df3a9c0aeadcec2d9824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php

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

/**
 * FAPI form builder for admin/settings/filters/settings page.
 *
 * @see better_formats_menu()
 */
function better_formats_settings_admin_form() {
  $form = array();

  $form['display'] = array(
    '#type' => 'fieldset',
    '#title' => t('Display'),
  );
  $form['display']['better_formats_fieldset_title'] = array(
    '#type'  => 'textfield',
    '#default_value' => variable_get('better_formats_fieldset_title', ''),
    '#title' => t('Selection title'),
    '#description' => t('Change the format selection title. Defaults to "Input format"'),
  );
  $form['display']['better_formats_long_tips_link_text'] = array(
    '#type'  => 'textfield',
    '#default_value' => variable_get('better_formats_long_tips_link_text', ''),
    '#title' => t('More format tips link text'),
    '#description' => t('Change the format full tips link text. Defaults to "More information about formatting options"'),
  );


  $form['control'] = array(
    '#type' => 'fieldset',
    '#title' => t('Control'),
  );
  $form['control']['better_formats_per_node_type'] = array(
    '#type'  => 'checkbox',
    '#title' => t('Control formats per node type'),
    '#description' => t('Control formats allowed and default formats per node type. Global settings will be used until a content type admin page is saved.'),
    '#default_value' => variable_get('better_formats_per_node_type', 0),
  );

  return system_settings_form($form);
}