Skip to content

Commit

Permalink
Fix empty files and CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
e-spin committed Dec 31, 2023
1 parent 3acccce commit 2b887be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"source":"https://github.com/contao-community-alliance/dc-general-contao-frontend"
},
"require": {
"php": "^8.0",
"contao-community-alliance/dc-general": "^2.3@dev",
"contao-community-alliance/url-builder": "~1.3",
"php": "^8.1",
"contao-community-alliance/dc-general": "^2.3",
"contao-community-alliance/url-builder": "^1.3",
"contao-community-alliance/translator": "^2.3",
"contao/core-bundle": "^4.13.0, <5.0",
"symfony/event-dispatcher": "^5.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ul id="files_<?= $this->id ?>" class="files">
<?php /** @var stdClass $file */ ?>
<?php foreach ($this->files as $key => $file): ?>
<li class="file-element ext-<?= $file['extension'] ?>">
<li class="file-element<?php if (!$this->showThumbnail): ?> download-element ext-<?= $file['extension'] ?><?php endif ?>">
<?php if ($this->showThumbnail): ?>
<?= sprintf(
'<img src="%s" width="%s" height="%s" alt="%s" itemprop="image">',
Expand All @@ -26,7 +26,7 @@
$file['thumbnail']['height'],
$file['name']
) ?>
<p class="file-name"><?= $file['name'] ?></p>
<br><span class="file-name"><?= $file['name'] ?></span>
<?php else: ?>
<span class="file-name"><?= $file['name'] ?></span>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/UploadOnSteroids.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private function validateMultipleUpload(): void
}

$inputName = $this->name;
$values = \array_map('\Contao\StringUtil::binToUuid', $this->value);
$values = \array_map('\Contao\StringUtil::binToUuid', (array) $this->value);

$files = [];
$inputFiles = $this->getMultipleUploadedFiles();
Expand Down

0 comments on commit 2b887be

Please sign in to comment.