- md5
- d524343ad03d591f21ebe343785579b3
- sha1
- 614f7b98bcf49941d6d19717695e1d14f4e6dd98
- sha256
- 016b5793ea9777c422248b65f882de79849928ea128697d882e5d4592a94694f
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
<?php
/**
* @package Joomla.Administrator
* @subpackage com_media
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate')
->useScript('com_media.edit-images')
->useStyle('com_media.mediamanager');
$params = ComponentHelper::getParams('com_media');
/** @var \Joomla\CMS\Form\Form $form */
$form = $this->form;
$tmpl = Factory::getApplication()->input->getCmd('tmpl');
// Load the toolbar when we are in an iframe
if ($tmpl == 'component')
{
echo '<div class="subhead noshadow">';
echo Toolbar::getInstance('toolbar')->render();
echo '</div>';
}
// Populate the media config
$config = [
'apiBaseUrl' => Uri::base() . 'index.php?option=com_media&format=json',
'csrfToken' => Session::getFormToken(),
'uploadPath' => $this->file->path,
'editViewUrl' => Uri::base() . 'index.php?option=com_media&view=file' . ($tmpl ? '&tmpl=' . $tmpl : ''),
'allowedUploadExtensions' => $params->get('upload_extensions', ''),
'maxUploadSizeMb' => $params->get('upload_maxsize', 10),
'contents' => $this->file->content,
];
$this->document->addScriptOptions('com_media', $config);
$this->useCoreUI = true;
?>
<form action="#" method="post" name="adminForm" id="media-form" class="form-validate main-card media-form mt-3">
<?php $fieldSets = $form->getFieldsets(); ?>
<?php if ($fieldSets) : ?>
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'attrib-' . reset($fieldSets)->name)); ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo '<div id="media-manager-edit-container" class="media-manager-edit"></div>'; ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
<?php endif; ?>
</form>
The same content is in 3 releases, Joomla 4.0.0-rc1 to 4.0.0-rc3. See them all, or every version of this file.