function diff_admin_settings in Diff 7.3
General configuration form for controlling the diff behaviour.
1 string reference to 'diff_admin_settings'
- diff_menu in ./
diff.module - Implements hook_menu().
File
- ./
diff.admin.inc, line 11 - Administration page callbacks and forms.
Code
function diff_admin_settings($form, $form_state) {
$form['diff_theme'] = array(
'#type' => 'select',
'#title' => t('CSS options'),
'#default_value' => variable_get('diff_theme', 'default'),
'#options' => array(
'default' => t('Classic'),
'boxes' => t('Boxes'),
),
'#empty_option' => t('- None -'),
'#description' => t('Alter the CSS used when displaying diff results.'),
);
$form['diff_radio_behavior'] = array(
'#type' => 'select',
'#title' => t('Diff radio behavior'),
'#default_value' => variable_get('diff_radio_behavior', 'simple'),
'#options' => array(
'simple' => t('Simple exclusion'),
'linear' => t('Linear restrictions'),
),
'#empty_option' => t('- None -'),
'#description' => t('<em>Simple exclusion</em> means that users will not be able to select the same revision, <em>Linear restrictions</em> means that users can only select older or newer revisions of the current selections.'),
);
$options = drupal_map_assoc(array(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
));
$form['diff_context_lines_leading'] = array(
'#type' => 'select',
'#title' => t('Leading context lines'),
'#description' => t('This governs the number of unchanged leading context "lines" to preserve.'),
'#default_value' => variable_get('diff_context_lines_leading', 2),
'#options' => $options,
);
$form['diff_context_lines_trailing'] = array(
'#type' => 'select',
'#title' => t('Trailing context lines'),
'#description' => t('This governs the number of unchanged trailing context "lines" to preserve.'),
'#default_value' => variable_get('diff_context_lines_trailing', 2),
'#options' => $options,
);
return system_settings_form($form);
}