ORIENT/modules/backend/formwidgets/fileupload/partials/_file_multi.htm

62 lines
2.7 KiB
HTML
Raw Normal View History

2014-05-14 13:24:20 +00:00
<div
id="<?= $this->getId() ?>"
class="field-fileupload style-file-multi is-sortable is-multi <?= count($fileList) ? 'is-populated' : '' ?> <?= $this->previewMode ? 'is-preview' : '' ?>"
2014-05-14 13:24:20 +00:00
data-control="fileupload"
data-upload-handler="<?= $this->getEventHandler('onUpload') ?>"
data-template="#<?= $this->getId('template') ?>"
data-error-template="#<?= $this->getId('errorTemplate') ?>"
2014-05-14 13:24:20 +00:00
data-sort-handler="<?= $this->getEventHandler('onSortAttachments') ?>"
data-max-filesize="<?= $maxFilesize ?>"
<?php if ($useCaption): ?>data-config-handler="<?= $this->getEventHandler('onLoadAttachmentConfig') ?>"<?php endif ?>
<?php if ($acceptedFileTypes): ?>data-file-types="<?= $acceptedFileTypes ?>"<?php endif ?>
2022-12-14 15:55:13 +00:00
<?php if ($maxFiles): ?>data-max-files="<?= $maxFiles ?>"<?php endif ?>
<?= $this->formField->getAttributes() ?>
>
2014-05-14 13:24:20 +00:00
<!-- Upload Button -->
<button type="button" class="btn btn-sm btn-secondary oc-icon-upload upload-button">
<?= $prompt ?>
</button>
2014-05-14 13:24:20 +00:00
<!-- Existing files -->
<div class="upload-files-container">
<?php foreach ($fileList as $file): ?>
2022-12-14 15:55:13 +00:00
<div class="server-file"
data-id="<?= $file->id ?>"
data-path="<?= $file->pathUrl ?>"
data-thumb="<?= $file->thumbUrl ?>"
data-name="<?= e($file->title ?: $file->file_name) ?>"
data-size="<?= e($file->file_size) ?>"
data-accepted="true"
></div>
<?php endforeach ?>
</div>
</div>
<!-- Template for new files -->
<script type="text/template" id="<?= $this->getId('template') ?>">
<div class="upload-object dz-preview dz-file-preview">
<div class="icon-container">
<i class="icon-file"></i>
2015-10-16 06:50:27 +00:00
<img data-dz-thumbnail alt="" />
</div>
<div class="info">
<h4 class="filename">
<span data-dz-name></span>
<a
href="javascript:;"
class="upload-remove-button"
data-request="<?= $this->getEventHandler('onRemoveAttachment') ?>"
data-request-confirm="<?= e(trans('backend::lang.fileupload.remove_confirm')) ?>"
><i class="icon-times"></i></a>
</h4>
<p class="size" data-dz-size></p>
</div>
<div class="meta">
<a href="javascript:;" class="drag-handle"><i class="icon-bars"></i></a>
<div class="progress-bar"><span class="upload-progress" data-dz-uploadprogress></span></div>
<div class="error-message"><span data-dz-errormessage></span></div>
</div>
</div>
</script>