-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New version 2.2.0 - Bump the requirements for the new release - Add the phpspec fix to the build configuration - Update the travis configuration - Add the option for normalize the extended folder path - Add the option for normalize the filename - Change the html markup of the edit buttons
- Loading branch information
Showing
10 changed files
with
772 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# OS | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# IDEs | ||
.buildpath | ||
.project | ||
.settings/ | ||
.build/ | ||
.external*/ | ||
.idea/ | ||
nbproject/ | ||
|
||
# composer related | ||
vendor/ | ||
composer.lock | ||
# OS | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# IDEs | ||
.buildpath | ||
.project | ||
.settings/ | ||
.build/ | ||
.external*/ | ||
.idea/ | ||
nbproject/ | ||
|
||
# composer related | ||
vendor/ | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of contao-community-alliance/dc-general-contao-frontend. | ||
* | ||
* (c) 2016-2019 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This project is provided in good faith and hope to be usable by anyone. | ||
* | ||
* @package contao-community-alliance/dc-general-contao-frontend | ||
* @author Sven Baumann <baumann.sv@gmail.com> | ||
* @copyright 2016-2019 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general-contao-frontend/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
||
use ContaoCommunityAlliance\DcGeneral\ContaoFrontend\Widgets\UploadOnSteroids; | ||
|
||
// Front end form widgets | ||
$GLOBALS['TL_FFL']['uploadOnSteroids'] = UploadOnSteroids::class; |
55 changes: 55 additions & 0 deletions
55
src/Resources/contao/templates/widgets/form_upload-on-steroids.html5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php /** @var ContaoCommunityAlliance\DcGeneral\ContaoFrontend\Widgets\UploadOnSteroids $this */ ?> | ||
<?php $this->extend('form_row'); ?> | ||
|
||
<?php $this->block('label'); ?> | ||
<?php if ($this->label): ?> | ||
<label for="ctrl_<?= $this->id ?>"<?php if ($this->class): ?> class="<?= $this->class ?>"<?php endif; ?>> | ||
<?php if ($this->mandatory): ?> | ||
<span class="invisible"><?= $this->mandatoryField ?> </span><?= $this->label ?><span class="mandatory">*</span> | ||
<?php else: ?> | ||
<?= $this->label ?> | ||
<?php endif; ?> | ||
</label> | ||
<?php endif; ?> | ||
|
||
<?php if ($this->files): ?> | ||
<div class="file-container"> | ||
<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?>"> | ||
<?php if($this->showThumbnail): ?> | ||
<img src="<?= $file->path ?>" title="<?= $file->name ?>" alt="<?= $file->name ?>" itemprop="image"> | ||
<p class="file-name"><?= $file->name ?></p> | ||
<?php else: ?> | ||
<span class="file-name"><?= $file->name ?></span> | ||
<?php endif;?> | ||
|
||
<div class="file-action"> | ||
<?php if($this->deselect): ?> | ||
<div class="file-reset"> | ||
<label for="ctrl_reset_<?= $this->id ?>_<?= $key ?>"><?= $this->trans('MSC.reset')?></label> | ||
<input type="checkbox" name="<?= $this->name ?>[reset][]" id="ctrl_reset_<?= $this->id ?>_<?= $key ?>" value="<?= \Contao\StringUtil::binToUuid($file->uuid) ?>"> | ||
</div> | ||
<?php endif; ?> | ||
<?php if($this->delete): ?> | ||
<div class="file-delete"> | ||
<label for="ctrl_delete_<?= $this->id ?>_<?= $key ?>"><?= $this->trans('MSC.delete')?></label> | ||
<input type="checkbox" name="<?= $this->name ?>[delete][]" id="ctrl_delete_<?= $this->id ?>_<?= $key ?>" value="<?= \Contao\StringUtil::binToUuid($file->uuid) ?>"> | ||
</div> | ||
<?php endif; ?> | ||
</div> | ||
</li> | ||
<?php endforeach; ?> | ||
</ul> | ||
</div> | ||
<?php endif; ?> | ||
<?php $this->endblock(); ?> | ||
|
||
<?php $this->block('field'); ?> | ||
<?php if ($this->hasErrors()): ?> | ||
<p class="error"><?= $this->getErrorAsString() ?></p> | ||
<?php endif; ?> | ||
<input type="hidden" name="<?= $this->name ?><?= $this->multiple ? '[]' : '' ?>" value="<?= $this->value ?>"> | ||
<input type="file" name="<?= $this->name ?><?= $this->multiple ? '[]' : '' ?>" id="ctrl_<?= $this->id ?>" class="upload<?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>"<?= $this->getAttributes() ?>> | ||
<?php $this->endblock(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.