diff --git a/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php b/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php index a38fe03..ee87fb8 100644 --- a/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php +++ b/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php @@ -6,6 +6,7 @@ * @copyright Copyright (C) 2005 - 2017 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\Factory; @@ -14,31 +15,29 @@ use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; use Joomla\Component\Weblinks\Site\Helper\RouteHelper; $app = Factory::getApplication(); if ($app->isClient('site')) { - JSession::checkToken('get') or die(Text::_('JINVALID_TOKEN')); + Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } -// Include the component HTML helpers. +HTMLHelper::_('behavior.multiselect'); -HTMLHelper::_('behavior.core'); -HTMLHelper::_('script', 'com_weblinks/admin-weblinks-modal.js', array('version' => 'auto', 'relative' => true)); -HTMLHelper::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); -HTMLHelper::_('formbehavior.chosen', 'select'); - -// Special case for the search field tooltip. -$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter'); -HTMLHelper::_('bootstrap.tooltip', '#filter_search', array('title' => Text::_($searchFilterDesc), 'placement' => 'bottom')); +/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ +$wa = $this->document->getWebAssetManager(); +$wa->useScript('core') + ->useScript('com_weblinks.admin-weblinks-modal'); $function = $app->input->getCmd('function', 'jSelectWeblink'); $editor = $app->input->getCmd('editor', ''); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $onclick = $this->escape($function); +$multilang = Multilanguage::isEnabled(); if (!empty($editor)) { @@ -57,48 +56,49 @@ $iconStates = array( ?>