From f99e6341c9fa5d02f68f95382e559acf29e88108 Mon Sep 17 00:00:00 2001
From: Dan Chadwick <dan899@gmail.com>
Date: Wed, 7 Oct 2015 06:56:03 -0400
Subject: [PATCH] Issue #2581685 by DanChadwick: Fixed component delete
 confirmation assumes fieldset.

---
 includes/webform.components.inc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/includes/webform.components.inc b/includes/webform.components.inc
index e12c79a..6330343 100644
--- a/includes/webform.components.inc
+++ b/includes/webform.components.inc
@@ -711,9 +711,13 @@ function webform_component_delete_form($form, $form_state, $node, $component) {
     '#value' => $component,
   );
 
-  if (webform_component_feature($node->webform['components'][$cid]['type'], 'group')) {
+  $component_type = $node->webform['components'][$cid]['type'];
+  if (webform_component_feature($component_type, 'group')) {
     $question = t('Delete the %name fieldset?', array('%name' => $node->webform['components'][$cid]['name']));
-    $description = t('This will immediately delete the %name fieldset and all children elements within %name from the %webform webform. This cannot be undone.', array('%name' => $node->webform['components'][$cid]['name'], '%webform' => $node->title));
+    $description = t('This will immediately delete the %name @type component and all nested components within %name from the %webform webform. This cannot be undone.',
+                     array('%name' => $node->webform['components'][$cid]['name'],
+                           '@type' => webform_component_property($component_type, 'label'),
+                           '%webform' => $node->title));
   }
   else {
     $question = t('Delete the %name component?', array('%name' => $node->webform['components'][$cid]['name']));
-- 
2.6.1.windows.1

