<div class="fileupload-config-form">
    <?= Form::open() ?>
        <input type="hidden" name="file_id" value="<?= $file->id ?>" />
        <input type="hidden" name="manage_id" value="<?= $relationManageId ?>" />
        <input type="hidden" name="_relation_field" value="<?= $relationField ?>" />

        <?php if (starts_with($displayMode, 'image')): ?>
            <div class="file-upload-modal-image-header">
                <button type="button" class="close" data-dismiss="popup">&times;</button>
                <img
                    src="<?= $file->thumbUrl ?>"
                    class="img-responsive center-block"
                    alt=""
                    title="<?= e(trans('backend::lang.fileupload.attachment')) ?>: <?= e($file->file_name) ?>"
                    style="<?= $cssDimensions ?>" />
            </div>
        <?php else: ?>
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="popup">&times;</button>
                <h4 class="modal-title"><?= e(trans('backend::lang.fileupload.attachment')) ?>: <?= $file->file_name ?></h4>
            </div>
        <?php endif ?>
        <div class="modal-body">
            <p><?= e(trans('backend::lang.fileupload.help')) ?></p>

            <div class="form-group">
                <input
                    type="text"
                    name="title"
                    class="form-control"
                    value="<?= $file->title ?>"
                    placeholder="<?= e(trans('backend::lang.fileupload.title_label')) ?>"
                    />
            </div>
            <div class="form-group">
                <textarea
                    name="description"
                    placeholder="<?= e(trans('backend::lang.fileupload.description_label')) ?>"
                    class="form-control"><?= $file->description ?></textarea>
            </div>

        </div>
        <div class="modal-footer">
            <a href="<?= $file->pathUrl ?>" class="pull-left btn btn-link fileupload-url-button" target="_blank">
                <i class="oc-icon-link"></i><?= e(trans('backend::lang.fileupload.attachment_url')) ?>
            </a>
            <button
                type="submit"
                class="btn btn-primary"
                data-request="<?= $this->getEventHandler('onSaveAttachmentConfig') ?>"
                data-popup-load-indicator>
                <?= e(trans('backend::lang.form.save')) ?>
            </button>
            <button
                type="button"
                class="btn btn-default"
                data-dismiss="popup">
                <?= e(trans('backend::lang.form.cancel')) ?>
            </button>
        </div>
    <?= Form::close() ?>
</div>
