Commit f31d0d3a authored by Dries's avatar Dries
Browse files

- Patch #948584 by yched: wrong implementations of hook_field_formatter_settings_form().

parent 5c32f334
......@@ -222,7 +222,7 @@ function number_field_formatter_settings_form($field, $instance, $view_mode, $fo
',' => t('Comma'),
' ' => t('Space'),
);
$form['thousand_separator'] = array(
$element['thousand_separator'] = array(
'#type' => 'select',
'#title' => t('Thousand marker'),
'#options' => $options,
......@@ -230,13 +230,13 @@ function number_field_formatter_settings_form($field, $instance, $view_mode, $fo
);
if ($display['type'] == 'number_decimal' || $display['type'] == 'number_float') {
$form['decimal_separator'] = array(
$element['decimal_separator'] = array(
'#type' => 'select',
'#title' => t('Decimal marker'),
'#options' => array('.' => t('Decimal point'), ',' => t('Comma')),
'#default_value' => $settings['decimal_separator'],
);
$form['scale'] = array(
$element['scale'] = array(
'#type' => 'select',
'#title' => t('Scale'),
'#options' => drupal_map_assoc(range(0, 10)),
......@@ -245,13 +245,13 @@ function number_field_formatter_settings_form($field, $instance, $view_mode, $fo
);
}
$form['prefix_suffix'] = array(
$element['prefix_suffix'] = array(
'#type' => 'checkbox',
'#title' => t('Display prefix and suffix.'),
'#default_value' => $settings['prefix_suffix'],
);
return $form;
return $element;
}
/**
......
......@@ -220,10 +220,10 @@ function text_field_formatter_settings_form($field, $instance, $view_mode, $form
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$form = array();
$element = array();
if (strpos($display['type'], '_trimmed') !== FALSE) {
$form['trim_length'] = array(
$element['trim_length'] = array(
'#title' => t('Trim length'),
'#type' => 'textfield',
'#size' => 10,
......@@ -233,7 +233,7 @@ function text_field_formatter_settings_form($field, $instance, $view_mode, $form
);
}
return $form;
return $element;
}
/**
......
......@@ -428,7 +428,7 @@ function image_field_formatter_settings_form($field, $instance, $view_mode, $for
$settings = $display['settings'];
$image_styles = image_style_options(FALSE);
$form['image_style'] = array(
$element['image_style'] = array(
'#title' => t('Image style'),
'#type' => 'select',
'#default_value' => $settings['image_style'],
......@@ -440,7 +440,7 @@ function image_field_formatter_settings_form($field, $instance, $view_mode, $for
'content' => t('Content'),
'file' => t('File'),
);
$form['image_link'] = array(
$element['image_link'] = array(
'#title' => t('Link image to'),
'#type' => 'select',
'#default_value' => $settings['image_link'],
......@@ -448,7 +448,7 @@ function image_field_formatter_settings_form($field, $instance, $view_mode, $for
'#options' => $link_types,
);
return $form;
return $element;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment