diff --git a/administrator/components/com_templates/View/Template/HtmlView.php b/administrator/components/com_templates/View/Template/HtmlView.php index 6450bbb29c86d..eb93d0f3965bf 100644 --- a/administrator/components/com_templates/View/Template/HtmlView.php +++ b/administrator/components/com_templates/View/Template/HtmlView.php @@ -14,8 +14,10 @@ use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; +use Joomla\CMS\Object\CMSObject; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; @@ -31,7 +33,7 @@ class HtmlView extends BaseHtmlView /** * The Model state * - * @var \JObject + * @var CMSObject */ protected $state; @@ -45,7 +47,7 @@ class HtmlView extends BaseHtmlView /** * For loading the source form * - * @var \JForm + * @var Form */ protected $form; @@ -261,7 +263,12 @@ protected function addToolbar() // Add a Template preview button if ($this->preview->client_id == 0) { - $bar->appendButton('Popup', 'picture', 'COM_TEMPLATES_BUTTON_PREVIEW', Uri::root() . 'index.php?tp=1&templateStyle=' . $this->preview->id, 800, 520); + $bar->popupButton('preview') + ->icon('icon-picture') + ->text('COM_TEMPLATES_BUTTON_PREVIEW') + ->url(Uri::root() . 'index.php?tp=1&templateStyle=' . $this->preview->id) + ->iframeWidth(800) + ->iframeHeight(520); } // Only show file manage buttons for global SuperUser