Commit 83df3cec authored by M Parker's avatar M Parker

Add field suffixes to textfields with units in pixels.

parent 8264e936
......@@ -65,6 +65,7 @@ function d3_sankey_table_group_pp_field_formatter_settings_form($field, $instanc
$element['width'] = array(
'#type' => 'textfield',
'#title' => t('Chart width'),
'#field_suffix' => t('px', array(), array('context' => 'unit of measurement (pixels)')),
'#element_validate' => array('element_validate_integer_positive'),
'#default_value' => $settings['width'],
);
......@@ -73,6 +74,7 @@ function d3_sankey_table_group_pp_field_formatter_settings_form($field, $instanc
$element['height'] = array(
'#type' => 'textfield',
'#title' => t('Chart height'),
'#field_suffix' => t('px', array(), array('context' => 'unit of measurement (pixels)')),
'#element_validate' => array('element_validate_integer_positive'),
'#default_value' => $settings['height'],
);
......@@ -81,6 +83,7 @@ function d3_sankey_table_group_pp_field_formatter_settings_form($field, $instanc
$element['nodeWidth'] = array(
'#type' => 'textfield',
'#title' => t('Node width'),
'#field_suffix' => t('px', array(), array('context' => 'unit of measurement (pixels)')),
'#element_validate' => array('element_validate_integer_positive'),
'#default_value' => $settings['nodeWidth'],
);
......@@ -89,6 +92,7 @@ function d3_sankey_table_group_pp_field_formatter_settings_form($field, $instanc
$element['nodePadding'] = array(
'#type' => 'textfield',
'#title' => t('Node padding'),
'#field_suffix' => t('px', array(), array('context' => 'unit of measurement (pixels)')),
'#element_validate' => array('element_validate_integer_positive'),
'#default_value' => $settings['nodePadding'],
);
......
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