diff --git a/templates/file/file-managed-file.func.php b/templates/file/file-managed-file.func.php index 87d9b97b5f2471f797b715855833b4acd12a7b82..c11fc63c02babe4aa9f0639620f9d1766ab80a8c 100644 --- a/templates/file/file-managed-file.func.php +++ b/templates/file/file-managed-file.func.php @@ -24,9 +24,12 @@ function bootstrap_file_managed_file(array $variables) { $element = $variables['element']; $attributes = array(); - if (isset($element['#id'])) { + + // For Webform use, do not add the id to the wrapper. + if (isset($element['#id']) && empty($element['#webform_component'])) { $attributes['id'] = $element['#id']; } + if (!empty($element['#attributes']['class'])) { $attributes['class'] = (array) $element['#attributes']['class']; } diff --git a/templates/webform/webform-managed-file.func.php b/templates/webform/webform-managed-file.func.php new file mode 100644 index 0000000000000000000000000000000000000000..00a6d47d22365b1bb20355298ec02272db837b86 --- /dev/null +++ b/templates/webform/webform-managed-file.func.php @@ -0,0 +1,27 @@ +