webform-element-audio-file.html.twig in Webform 6.x
Same filename and directory in other branches
Default theme implementation for an audio file element.
Available variables:
- element: The element.
- value: The element's value.
- options Associative array of options for element.
- file: The element's File object.
- file_link: Link to the file.
See also
http://caniuse.com/#feat=audio
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
File
templates/webform-element-audio-file.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for an audio file element.
- *
- * Available variables:
- * - element: The element.
- * - value: The element's value.
- * - options Associative array of options for element.
- * - file: The element's File object.
- * - file_link: Link to the file.
- *
- * @see http://caniuse.com/#feat=audio
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
- */
- #}
- {% if extension == 'mp3' %}
- <div class="webform-audio-file">
- <audio controls>
- <source src="{{ uri }}" type="{{ type }}">
- </audio>
- </div>
- {% endif %}
- <div>{{ file_link }}</div>