Commit 8e124ca6 authored by Stefan Korn's avatar Stefan Korn Committed by Hans van Wezenbeek
Browse files

Issue #3227557 by stefan.korn: Show warning message about media types...

Issue #3227557 by stefan.korn: Show warning message about media types assignment only for bulk upload with multiple media types
parent 68369bd0
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ class MediaBulkUploadForm extends FormBase {
      '#items' => $mediaTypeLabels,
    ];

    if (count($mediaTypes) > 1) {
      $form['information_wrapper']['warning'] = [
        '#type' => 'html_tag',
        '#tag' => 'p',
@@ -218,6 +219,7 @@ class MediaBulkUploadForm extends FormBase {
        '#name' => 'media_bulk_upload_information',
        '#value' => $this->t('Please be aware that if file extensions overlap between the media types that are available in this upload form, that the media entity will be assigned automatically to one of these types.'),
      ];
    }

    $validators = array(
      'file_validate_extensions' => [implode(' ', $this->allowed_extensions)],