- md5
- cf0bdcea955537766db13d5163165afc
- sha1
- 9799667623fcf6d8d910123763f72b8dbe9af0fa
- sha256
- ac0f463ce2ed9f6f35d20dbe969e566e5a4c43f91e327f45c37f90e0387f159b
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
<?php
/**
* @package Joomla.Administrator
* @subpackage com_media
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @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 Toolbar::getInstance('toolbar')->render();
}
// Populate the media config
$config = [
'apiBaseUrl' => Uri::root() . 'administrator/index.php?option=com_media&format=json',
'csrfToken' => Session::getFormToken(),
'uploadPath' => $this->file->path,
'editViewUrl' => Uri::root() . 'administrator/index.php?option=com_media&view=file' . (!empty($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;
?>
<div class="row">
<form action="#" method="post" name="adminForm" id="media-form" class="form-validate col-md-12">
<?php $fieldSets = $form->getFieldsets(); ?>
<?php if ($fieldSets) : ?>
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'attrib-' . reset($fieldSets)->name)); ?>
<?php echo '<div id="media-manager-edit-container" class="media-manager-edit d-flex justify-content-around col-md-9 p-4"></div>'; ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
<?php endif; ?>
</form>
</div>
The same content is in 2 releases, Joomla 4.0.0-beta2 to 4.0.0-beta3. See them all, or every version of this file.