// Unify thumb param in files options
This commit is contained in:
@@ -43,13 +43,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($thumb) && $thumb}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-12">
|
||||
<img src="{$thumb}" alt="{$title}" title="{$title}" class="img-thumbnail" />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($max_files) && $files|count >= $max_files}
|
||||
<div class="row">
|
||||
<div class="alert alert-warning">{l s='You have reached the limit (%s) of files to upload, please remove files to continue uploading' sprintf=$max_files}</div>
|
||||
|
||||
@@ -140,9 +140,14 @@ class HelperFormCore extends Helper
|
||||
'download_url' => isset($params['file'])?$params['file']:null
|
||||
)));
|
||||
|
||||
$uploader->setThumb(isset($params['thumb'])?$params['thumb']:null);
|
||||
$uploader->setTitle(isset($params['title'])?$params['title']:null);
|
||||
if (isset($params['thumb']) && $params['thumb']) // Use for retrocompatibility
|
||||
$uploader->setFiles(array(
|
||||
0 => array(
|
||||
'type' => HelperUploader::TYPE_IMAGE,
|
||||
'image' => isset($params['thumb'])?'<img src="'.$params['thumb'].'" alt="'.$params['title'].'" title="'.$params['title'].'" />':null,
|
||||
)));
|
||||
|
||||
$uploader->setTitle(isset($params['title'])?$params['title']:null);
|
||||
$params['file'] = $uploader->render();
|
||||
break;
|
||||
|
||||
|
||||
@@ -126,7 +126,13 @@ class HelperOptionsCore extends Helper
|
||||
'download_url' => isset($field['file'])?$field['file']:null
|
||||
)));
|
||||
|
||||
$uploader->setThumb(isset($field['thumb'])?$field['thumb']:null);
|
||||
if (isset($field['thumb']) && $field['thumb']) // Use for retrocompatibility
|
||||
$uploader->setFiles(array(
|
||||
0 => array(
|
||||
'type' => HelperUploader::TYPE_IMAGE,
|
||||
'image' => isset($field['thumb'])?'<img src="'.$field['thumb'].'" alt="'.$field['title'].'" title="'.$field['title'].'" />':null,
|
||||
)));
|
||||
|
||||
$uploader->setTitle(isset($field['title'])?$field['title']:null);
|
||||
$field['file'] = $uploader->render();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user