You are here

dropzonejs--media-upload.html.twig in Media Directories 3.x

Theme implementation for the dropzonejs form element.

Available variables:

  • attributes: A list of HTML attributes for the element.
  • dropzone_description: A message to be displayed in the dropzone field.
  • or_text: A translatable string of the word 'or'.
  • select_files_button_text: The text shown on the 'Select files' button.
  • children: Optional additional rendered elements.
  • uploaded_files: Hidden element that holds uploaded files.

See also

template_preprocess_dropzonejs()

File

modules/media_directories_ui/templates/dropzonejs--media-upload.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme implementation for the dropzonejs form element.
  5. *
  6. * Available variables:
  7. * - attributes: A list of HTML attributes for the element.
  8. * - dropzone_description: A message to be displayed in the dropzone field.
  9. * - or_text: A translatable string of the word 'or'.
  10. * - select_files_button_text: The text shown on the 'Select files' button.
  11. * - children: Optional additional rendered elements.
  12. * - uploaded_files: Hidden element that holds uploaded files.
  13. *
  14. * @see template_preprocess_dropzonejs()
  15. */
  16. #}
  17. <div{{ attributes }}>
  18. <div class="dz-message">
  19. <p>{{ dropzone_description }}</p>
  20. <p>{{ or_text }}</p>
  21. <a href="#" onclick="event.preventDefault();"
  22. class="button">{{ select_files_button_text }}</a>
  23. </div>
  24. </div>
  25. {% if max_filesize_description %}
  26. <div>{{ max_filesize_description }}</div>
  27. {% endif %}
  28. {% if extensions_description %}
  29. <div>{{ extensions_description }}</div>
  30. {% endif %}
  31. {{ uploaded_files }}
  32. {{ children }}