From 4a187d271bcab4c5eead39a9d303722e216bcb5e Mon Sep 17 00:00:00 2001
From: Angie Byron <webchick@24967.no-reply.drupal.org>
Date: Wed, 20 Oct 2010 16:19:24 +0000
Subject: [PATCH] #936536 by rszrama, sun, yched: Fixed Missing #empty_option
 on a couple selects.

---
 modules/field_ui/field_ui.admin.inc | 6 ++++++
 modules/image/image.field.inc       | 2 ++
 modules/system/system.admin.inc     | 1 +
 modules/trigger/trigger.admin.inc   | 1 +
 4 files changed, 10 insertions(+)

diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc
index 8db42d697c56..ffa7330f62f0 100644
--- a/modules/field_ui/field_ui.admin.inc
+++ b/modules/field_ui/field_ui.admin.inc
@@ -338,6 +338,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
           '#title' => t('Parent for @title', array('@title' => $instance['label'])),
           '#title_display' => 'invisible',
           '#options' => $table['#parent_options'],
+          '#empty_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
         ),
@@ -406,6 +407,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
           '#title' => t('Parent for @title', array('@title' => $extra_field['label'])),
           '#title_display' => 'invisible',
           '#options' => $table['#parent_options'],
+          '#empty_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
         ),
@@ -465,6 +467,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
           '#title' => t('Parent for new field'),
           '#title_display' => 'invisible',
           '#options' => $table['#parent_options'],
+          '#empty_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#prefix' => '<div class="add-new-placeholder">&nbsp;</div>',
           '#parents' => array('fields', $name, 'parent'),
@@ -544,6 +547,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
           '#title' => t('Parent for existing field'),
           '#title_display' => 'invisible',
           '#options' => $table['#parent_options'],
+          '#empty_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#prefix' => '<div class="add-new-placeholder">&nbsp;</div>',
           '#parents' => array('fields', $name, 'parent'),
@@ -916,6 +920,7 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
           '#title' => t('Label display for @title', array('@title' => $instance['label'])),
           '#title_display' => 'invisible',
           '#options' => $table['#parent_options'],
+          '#empty_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
         ),
@@ -1077,6 +1082,7 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
           '#title' => t('Parents for @title', array('@title' => $extra_field['label'])),
           '#title_display' => 'invisible',
           '#options' => $table['#parent_options'],
+          '#empty_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
         ),
diff --git a/modules/image/image.field.inc b/modules/image/image.field.inc
index ce8217bab4db..1aa1275128b4 100644
--- a/modules/image/image.field.inc
+++ b/modules/image/image.field.inc
@@ -278,6 +278,7 @@ function image_field_widget_settings_form($field, $instance) {
     '#title' => t('Preview image style'),
     '#type' => 'select',
     '#options' => image_style_options(FALSE),
+    '#empty_option' => '<' . t('no preview') . '>',
     '#default_value' => $settings['preview_image_style'],
     '#description' => t('The preview image will be shown while editing the content.'),
     '#weight' => 15,
@@ -443,6 +444,7 @@ function image_field_formatter_settings_form($field, $instance, $view_mode, $for
     '#title' => t('Link image to'),
     '#type' => 'select',
     '#default_value' => $settings['image_link'],
+    '#empty_option' => t('Nothing'),
     '#options' => $link_types,
   );
 
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 814579199776..f20605589f15 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -2931,6 +2931,7 @@ function system_actions_manage_form($form, &$form_state, $options = array()) {
     '#title' => t('Action'),
     '#title_display' => 'invisible',
     '#options' => $options,
+    '#empty_option' => t('Choose an advanced action'),
   );
   $form['parent']['actions'] = array('#type' => 'actions');
   $form['parent']['actions']['submit'] = array(
diff --git a/modules/trigger/trigger.admin.inc b/modules/trigger/trigger.admin.inc
index 6bccdbb081b7..639570adc342 100644
--- a/modules/trigger/trigger.admin.inc
+++ b/modules/trigger/trigger.admin.inc
@@ -182,6 +182,7 @@ function trigger_assign_form($form, $form_state, $module, $hook, $label) {
       '#title' => t('List of trigger actions when !description', array('!description' => $label)),
       '#title_display' => 'invisible',
       '#options' => $options,
+      '#empty_option' => t('Choose an action'),
     );
     $form[$hook]['parent']['submit'] = array(
       '#type' => 'submit',
-- 
GitLab