{{ asset_add('scripts.js', 'visiosoft.field_type.media::js/jquery-sortable.js') }}

{% if not (field_type.readonly) %}
    {% if field_type.config.mode in ['default', 'select'] %}
        <a data-toggle="modal" data-target="#{{ field_type.field_name }}-modal" class="btn btn-info btn-xs"
           href="{{ url('streams/media-field_type/index/' ~ field_type.config_key) }}">{{ trans('anomaly.field_type.file::button.select_file') }}</a>
    {% endif %}

    {% if field_type.config.mode in ['default', 'upload'] %}
        {% include "visiosoft.field_type.media::upload/index" %}
    {% endif %}
{% endif %}

<input type="hidden" name="{{ field_type.input_name }}"
       value="{{ field_type.ids|join(',') }}" {{ html_attributes(field_type.attributes) }} {{ field_type.disabled ? 'disabled' }} {{ field_type.readonly ? 'readonly' }}>

<div class="selected">
    {{ field_type.value_table|raw }}
</div>

<div class="modal remote" id="{{ field_type.field_name }}-modal">
    <div class="modal-dialog modal-wide">
        <div class="modal-content"></div>
    </div>
</div>
{{ asset_add("styles.css", "visiosoft.field_type.media::css/imgList.css") }}
