{% extends 'bootstrap_4_layout.html.twig' %} {% block file_widget -%}
{% set value = form.vars.data %} {% if value %} {% if value and value.extension in ['jpeg', 'jpg', 'gif', 'png', 'svg'] %}
{{- parent() -}}
{% else %}
{{- parent() -}}
{% endif %} {% else %} {{- parent() -}} {% endif %}
{% endblock %} {% block collection_block_widget %}
{% for item in form.value %}
{% for child in item %} {{ form_row(child) }} {% endfor %}
{{ label_delete|trans }}
{% endfor %}
{{ label_add|trans }}
{% endblock %} {% block murph_collection_widget %}
{% for item in form %}
{% for child in item %} {{ form_row(child) }} {% endfor %}
{{ label_delete|trans }}
{% endfor %}
{{ label_add|trans }}
{% endblock %} {% block file_picker_widget %}
{% set value = form.vars.data %}
{% if value %} {% if value.extension is defined and value.extension in ['jpeg', 'jpg', 'gif', 'png', 'svg'] %} {% else %} {% for extension in ['.jpeg', '.jpg', '.gif', '.png', '.svg'] %} {% if value ends with extension %} {% endif %} {% endfor %} {% endif %} {% endif %}
{{- form_widget(form) -}}
{{ 'Choose'|trans }}
{% if value %} {% if value.pathname is defined %} {{ 'Download'|trans }} {% else %} {{ 'Download'|trans }} {% endif %} {% endif %}
{% endblock %} {% block form_row -%} {%- set widget_attr = {} -%} {%- if help is not empty -%} {%- set widget_attr = {attr: {'aria-describedby': id ~ "_help"}} -%} {%- endif -%} {%- if compound is defined and compound -%} {%- set element = 'fieldset' -%} {% else %} {%- set element = 'div' -%} {%- endif -%} {% if element == 'fieldset' and not ('col-' in form.vars.row_attr.class|default('')) %} {% set class = row_attr.class|default('') ~ ' col-md-12 form-group' %} {% else %} {% set class = row_attr.class|default('') ~ ' form-group' %} {% endif %} <{{ element }}{% with {attr: row_attr|merge({class: class|trim})} %}{{ block('attributes') }}{% endwith %}> {{- form_label(form) -}} {{- form_widget(form) -}} {{- form_help(form) -}} {%- endblock form_row %}