Commit 415a38dd authored by sdstyles's avatar sdstyles Committed by targoo

Issue #2564849 by sdstyles: Notice: Undefined index: #title in theme_color_field_default_widget()

parent 42514577
...@@ -95,44 +95,44 @@ function _color_field_field_instance_settings_form($field, $instance) { ...@@ -95,44 +95,44 @@ function _color_field_field_instance_settings_form($field, $instance) {
$form['cell_width'] = array( $form['cell_width'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Cell width'), '#title' => t('Cell width'),
'#description' => t('Width of each individual color cell.'),
'#default_value' => $instance_settings['cell_width'], '#default_value' => $instance_settings['cell_width'],
'#required' => TRUE, '#required' => TRUE,
'#description' => t('Width of each individual color cell.'),
); );
$form['cell_height'] = array( $form['cell_height'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Height width'), '#title' => t('Height width'),
'#description' => t('Height of each individual color cell.'),
'#default_value' => $instance_settings['cell_height'], '#default_value' => $instance_settings['cell_height'],
'#required' => TRUE, '#required' => TRUE,
'#description' => t('Height of each individual color cell.'),
); );
$form['cell_margin'] = array( $form['cell_margin'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Cell margin'), '#title' => t('Cell margin'),
'#description' => t('Margin of each individual color cell.'),
'#default_value' => $instance_settings['cell_margin'], '#default_value' => $instance_settings['cell_margin'],
'#required' => TRUE, '#required' => TRUE,
'#description' => t('Margin of each individual color cell.'),
); );
$form['box_width'] = array( $form['box_width'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Box width'), '#title' => t('Box width'),
'#description' => t('Width of the color display box.'),
'#default_value' => $instance_settings['box_width'], '#default_value' => $instance_settings['box_width'],
'#required' => TRUE, '#required' => TRUE,
'#description' => t('Width of the color display box.'),
); );
$form['box_height'] = array( $form['box_height'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Box height'), '#title' => t('Box height'),
'#description' => t('Height of the color display box.'),
'#default_value' => $instance_settings['box_height'], '#default_value' => $instance_settings['box_height'],
'#required' => TRUE, '#required' => TRUE,
'#description' => t('Height of the color display box.'),
); );
$form['columns'] = array( $form['columns'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Columns number'), '#title' => t('Columns number'),
'#description' => t('Number of columns to display. Color order may look strange if this is altered.'),
'#default_value' => $instance_settings['columns'], '#default_value' => $instance_settings['columns'],
'#required' => TRUE, '#required' => TRUE,
'#description' => t('Number of columns to display. Color order may look strange if this is altered.'),
); );
break; break;
} }
...@@ -157,6 +157,7 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance, ...@@ -157,6 +157,7 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance,
$element['rgb'] = array( $element['rgb'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => '',
'#description' => t('Format #FFFFFF'), '#description' => t('Format #FFFFFF'),
'#default_value' => $value, '#default_value' => $value,
'#size' => 7, '#size' => 7,
...@@ -164,7 +165,7 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance, ...@@ -164,7 +165,7 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance,
); );
if ($field_settings['opacity']) { if ($field_settings['opacity']) {
$element['rgb']['#title'] = 'Color'; $element['rgb']['#title'] = t('Color');
$element['opacity'] = array( $element['opacity'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Opacity'), '#title' => t('Opacity'),
......
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