Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions layouts/joomla/form/field/contenthistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;

extract($displayData);
Expand Down Expand Up @@ -51,27 +50,21 @@
* @var array $dataAttributes Miscellaneous data attributes for eg, data-*.
*/

echo HTMLHelper::_(
'bootstrap.renderModal',
'versionsModal',
[
'url' => Route::_($link),
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '80',
'bodyHeight' => '60',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->useScript('joomla.dialog-autocreate');

$dialogOptions = [
'popupType' => 'iframe',
'src' => Route::_($link, false),
'textHeader' => $label,
];

?>
<button
type="button"
class="btn btn-secondary"
data-bs-toggle="modal"
data-bs-target="#versionsModal"
data-joomla-dialog="<?php echo $this->escape(json_encode($dialogOptions, JSON_UNESCAPED_SLASHES)); ?>"
<?php echo $dataAttribute; ?>>
<span class="icon-code-branch" aria-hidden="true"></span>
<?php echo $label; ?>
Expand Down
2 changes: 1 addition & 1 deletion layouts/joomla/toolbar/versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<joomla-toolbar-button id="toolbar-versions">
<button
class="btn btn-primary"
data-joomla-dialog="<?php echo $this->escape(json_encode($dialogOptions)); ?>"
data-joomla-dialog="<?php echo $this->escape(json_encode($dialogOptions, JSON_UNESCAPED_SLASHES)); ?>"
type="button">
<span class="icon-code-branch" aria-hidden="true"></span>
<?php echo $title; ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/cassiopeia/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<jdoc:include type="styles" />
<jdoc:include type="scripts" />
</head>
<body class="<?php echo $this->direction === 'rtl' ? 'rtl' : ''; ?>">
<body class="contentpane component <?php echo $this->direction === 'rtl' ? 'rtl' : ''; ?>">
<jdoc:include type="message" />
<jdoc:include type="component" />
</body>
Expand Down