Skip to content

Commit

Permalink
Media field
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedik committed Nov 6, 2023
1 parent cdbf754 commit 63d026f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions layouts/joomla/form/field/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,14 @@
$style .= ($height > 0) ? 'max-height:' . $height . 'px;' : '';

$imgattr = [
'id' => $id . '_preview',
'class' => 'media-preview',
'style' => $style,
];

$img = HTMLHelper::_('image', $src, Text::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr);

$previewImg = '<div id="' . $id . '_preview_img">' . $img . '</div>';
$previewImgEmpty = '<div id="' . $id . '_preview_empty"' . ($src ? ' class="hidden"' : '') . '>'
$previewImg = '<div class="preview_img">' . $img . '</div>';
$previewImgEmpty = '<div class="preview_empty"' . ($src ? ' class="hidden"' : '') . '>'
. Text::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>';

$showPreview = 'static';
Expand Down

0 comments on commit 63d026f

Please sign in to comment.