function file_field_diff_options_form in Diff 7.3
Provide a form for setting the field comparison options.
File
- includes/
file.inc, line 93 - Provide diff field functions for the file module.
Code
function file_field_diff_options_form($field_type, $settings) {
$options_form = array();
$options_form['show_id'] = array(
'#type' => 'checkbox',
'#title' => t('Show file ID'),
'#default_value' => $settings['show_id'],
);
$options_form['compare_description_field'] = array(
'#type' => 'checkbox',
'#title' => t('Compare description field'),
'#default_value' => $settings['compare_description_field'],
'#description' => t('This is only used if the "Enable <em>Description</em> field" is checked in the instance settings.'),
);
$options_form['compare_display_field'] = array(
'#type' => 'checkbox',
'#title' => t('Compare display state field'),
'#default_value' => $settings['compare_display_field'],
'#description' => t('This is only used if the "Enable <em>Display</em> field" is checked in the field settings.'),
);
$options_form['property_separator'] = array(
'#type' => 'select',
'#title' => t('Property separator'),
'#default_value' => $settings['property_separator'],
'#description' => t('Provides the ability to show properties inline or across multiple lines.'),
'#options' => array(
', ' => t('Comma (,)'),
'; ' => t('Semicolon (;)'),
' ' => t('Space'),
'nl' => t('New line'),
),
);
// Allow users to set their own separator using variable_set().
if (!isset($options_form['#options'][$settings['property_separator']])) {
$options_form['#options'][$settings['property_separator']] = $settings['property_separator'];
}
return $options_form;
}