wiki-grav/plugins/flex-objects/templates/forms/fields/filepicker/filepicker.html.twig

18 lines
507 B
Twig
Raw Permalink Normal View History

{% embed "forms/fields/select/select.html.twig" %}
{% block input %}
{% if not field.options and value %}
{% set field = field|merge({options: {(value): value}}) %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block global_attributes %}
data-grav-filepicker
data-name="{{field.name}}"
{% if field.preview_images %}data-preview-images{% endif %}
data-value="{{value}}"
{{ parent() }}
{% endblock %}
{% endembed %}