src/Rhyme/WMassArtsHub/Resources/contao/templates/form/form_dmuploader.html5 line 5

Open in your IDE?
  1. <?php $this->extend('form_row'); ?>
  2. <?php $this->block('label'); ?>
  3. <?php
  4. $arrNewFiles = [];
  5. foreach ((array)$_SESSION['FILES'] as $file) {
  6.     $arrNewFiles[] = $file['short_tmp_name'];
  7. }
  8. $arrNewFiles array_unique($arrNewFiles);
  9. ?>
  10. <div class="row">
  11.     <div class="col col-md-6">
  12.         <div id="drag-and-drop-zone" class="dm-uploader card text-center">
  13.             <h3 class="card-title">Drag &amp; drop here</h3>
  14.             <?php if ($this->label): ?>
  15.                 <label for="ctrl_<?= $this->id ?>"<?php if ($this->class): ?> class="<?= $this->class ?>"<?php endif; ?>>
  16.                     <?php if ($this->mandatory): ?>
  17.                         <span class="invisible"><?= $this->mandatoryField ?> </span><?= $this->label ?><span class="mandatory">*</span>
  18.                     <?php else: ?>
  19.                         <?= $this->label ?>
  20.                     <?php endif; ?>
  21.                 </label>
  22.             <?php endif; ?>
  23.             <?php $this->endblock(); ?>
  24.             <?php $this->block('field'); ?>
  25.             <?php if ($this->hasErrors()): ?>
  26.                 <p class="error"><?= $this->getErrorAsString() ?></p>
  27.             <?php endif; ?>
  28.             <input type="file" name="temp_dmuploader" class="invisible">
  29.             <div class="button button-primary trigger-button">
  30.                 <span>Or, Click to Open the File Browser</span>
  31.                 <input type="hidden" name="<?= $this->name ?>_dmuploader" id="ctrl_<?= $this->id ?>_dmuploader" class="<?php if ($this->class) echo ' ' $this->class?>"<?= $this->getAttributes() ?>>
  32.                 <input type="hidden" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="dmupload<?php if ($this->class) echo ' ' $this->class?>"<?= $this->getAttributes() ?> value="<?= specialchars(implode(','$arrNewFiles)) ?>">
  33.             </div>
  34.         </div>
  35.     </div>
  36.     <div class="col col-md-6">
  37.         <div id="file-list" class="card filesList">
  38.             <ul id="files">
  39.                 <li class="empty">No files uploaded</li>
  40.             </ul>
  41.         </div>
  42.     </div>
  43. </div>
  44. <script type="text/html" id="files-template">
  45.     <li class="media">
  46.         <img class="mr-3 mb-2 preview-img" src="/files/assets/img/placeholder/placeholder-upload.jpg" alt="Generic placeholder image">
  47.         <div class="media-body mb-1">
  48.             <p class="mb-2">
  49.                 <strong>%%filename%%</strong> - Status: <span class="text-muted">Waiting</span>
  50.             </p>
  51.             <div class="progress mb-2">
  52.                 <div class="progress-bar progress-bar-striped progress-bar-animated bg-primary"
  53.                      role="progressbar"
  54.                      style="width: 0%"
  55.                      aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
  56.                 </div>
  57.             </div>
  58.             <hr class="mt-1 mb-1" />
  59.         </div>
  60.     </li>
  61. </script>
  62. <?php $this->endblock(); ?>