Commit 07260430 authored by targoo's avatar targoo

remove unused code / Remove title when no alpha is required

parent 881b79f7
...@@ -157,14 +157,14 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance, ...@@ -157,14 +157,14 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance,
$element['rgb'] = array( $element['rgb'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Color'),
'#description' => t('Format #FFFFFF'), '#description' => t('Format #FFFFFF'),
'#default_value' => $value, '#default_value' => $value,
'#size' => 7, '#size' => 7,
'#maxlength' => 7, '#maxlength' => 7,
); );
if (isset($field['settings']['opacity']) && $field['settings']['opacity']) { if ($field_settings['opacity']) {
$element['rgb']['#title'] = 'Color';
$element['opacity'] = array( $element['opacity'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Opacity'), '#title' => t('Opacity'),
...@@ -175,12 +175,6 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance, ...@@ -175,12 +175,6 @@ function _color_field_field_widget_form(&$form, &$form_state, $field, $instance,
); );
} }
switch ($widget['type']) {
case 'color_field_default_widgett':
$element['rgb']['#type'] = 'token';
break;
}
$element += array( $element += array(
'#field_settings' => $field_settings, '#field_settings' => $field_settings,
'#instance_settings' => $instance_settings, '#instance_settings' => $instance_settings,
......
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