form_extra): ?>
- 'personal-information')); ?>
-
+ 'personal-information')); ?>
+
diff --git a/src/components/com_tjucm/administrator/views/item/tmpl/edit_extrafields.php b/src/components/com_tjucm/administrator/views/item/tmpl/edit_extrafields.php
index b45d4192..35bf6b45 100644
--- a/src/components/com_tjucm/administrator/views/item/tmpl/edit_extrafields.php
+++ b/src/components/com_tjucm/administrator/views/item/tmpl/edit_extrafields.php
@@ -9,12 +9,15 @@
// No direct access
defined('_JEXEC') or die;
+use Joomla\CMS\HTML\HTMLHelper;
+use Joomla\CMS\Filter\OutputFilter;
+use Joomla\CMS\Language\Text;
?>
form_extra):
//~ echo $this->form_extra->getFieldsets(0)->name;
- echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'personal-information'));
+ echo HTMLHelper::_('bootstrap.startTabSet', 'myTab', array('active' => 'personal-information'));
endif;
?>
@@ -24,8 +27,8 @@
getFieldsets() as $fieldName => $fieldset): ?>
name));
- echo JHtml::_("bootstrap.addTab", "myTab", $tabName, $fieldset->name);
+ $tabName = OutputFilter::stringURLUnicodeSlug(trim($fieldset->name));
+ echo HTMLHelper::_("bootstrap.addTab", "myTab", $tabName, $fieldset->name);
?>
form_extra as $field1): ?>
@@ -46,13 +49,13 @@
-
+
diff --git a/src/components/com_tjucm/administrator/views/item/view.html.php b/src/components/com_tjucm/administrator/views/item/view.html.php
index b6b01f4c..49864cf0 100644
--- a/src/components/com_tjucm/administrator/views/item/view.html.php
+++ b/src/components/com_tjucm/administrator/views/item/view.html.php
@@ -10,15 +10,17 @@
// No direct access
defined('_JEXEC') or die;
-
-jimport('joomla.application.component.view');
+use Joomla\CMS\MVC\View\HtmlView;
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Toolbar\ToolbarHelper;
/**
* View to edit
*
* @since 1.6
*/
-class TjucmViewItem extends JViewLegacy
+class TjucmViewItem extends HtmlView
{
protected $state;
@@ -43,8 +45,8 @@ public function display($tpl = null)
// Get form for extra fields.
- $this->client = JFactory::getApplication()->input->get('client');
- $id = JFactory::getApplication()->input->get('id');
+ $this->client = Factory::getApplication()->input->get('client');
+ $id = Factory::getApplication()->input->get('id');
$model = $this->getModel('item');
$view = explode('.', $this->client);
@@ -80,9 +82,9 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
- JFactory::getApplication()->input->set('hidemainmenu', true);
+ Factory::getApplication()->input->set('hidemainmenu', true);
- $user = JFactory::getUser();
+ $user = Factory::getUser();
$isNew = ($this->item->id == 0);
if (isset($this->item->checked_out))
@@ -96,39 +98,39 @@ protected function addToolbar()
$canDo = TjucmHelper::getActions();
- JToolBarHelper::title(JText::_('COM_TJUCM_TITLE_ITEM'), 'icon-pencil');
+ ToolbarHelper::title(Text::_('COM_TJUCM_TITLE_ITEM'), 'icon-pencil');
// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || ($canDo->get('core.create'))))
{
- JToolBarHelper::apply('item.apply', 'JTOOLBAR_APPLY');
- JToolBarHelper::save('item.save', 'JTOOLBAR_SAVE');
+ ToolbarHelper::apply('item.apply', 'JTOOLBAR_APPLY');
+ ToolbarHelper::save('item.save', 'JTOOLBAR_SAVE');
}
if (!$checkedOut && ($canDo->get('core.create')))
{
- JToolBarHelper::custom('item.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
+ ToolbarHelper::custom('item.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
}
// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create'))
{
- JToolBarHelper::custom('item.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
+ ToolbarHelper::custom('item.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
}
// Button for version control
if ($this->state->params->get('save_history', 1) && $user->authorise('core.edit'))
{
- JToolbarHelper::versions('com_tjucm.item', $this->item->id);
+ ToolbarHelper::versions('com_tjucm.item', $this->item->id);
}
if (empty($this->item->id))
{
- JToolBarHelper::cancel('item.cancel', 'JTOOLBAR_CANCEL');
+ ToolbarHelper::cancel('item.cancel', 'JTOOLBAR_CANCEL');
}
else
{
- JToolBarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE');
+ ToolbarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE');
}
}
}
diff --git a/src/components/com_tjucm/administrator/views/items/tmpl/default.php b/src/components/com_tjucm/administrator/views/items/tmpl/default.php
index 3517d6bf..1c2bea39 100644
--- a/src/components/com_tjucm/administrator/views/items/tmpl/default.php
+++ b/src/components/com_tjucm/administrator/views/items/tmpl/default.php
@@ -9,30 +9,35 @@
// No direct access
defined('_JEXEC') or die;
+use Joomla\CMS\HTML\HTMLHelper;
+use Joomla\CMS\Factory;
+use Joomla\CMS\Uri\Uri;
+use Joomla\CMS\Router\Route;
+use Joomla\CMS\Language\Text;
-JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/');
-JHtml::_('bootstrap.tooltip');
-JHtml::_('behavior.multiselect');
-JHtml::_('formbehavior.chosen', 'select');
+HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers/');
+HTMLHelper::_('bootstrap.tooltip');
+HTMLHelper::_('behavior.multiselect');
+HTMLHelper::_('formbehavior.chosen', 'select');
// Import CSS
-$document = JFactory::getDocument();
-$document->addStyleSheet(JUri::root() . 'administrator/components/com_tjucm/assets/css/tjucm.css');
-$document->addStyleSheet(JUri::root() . 'media/com_tjucm/css/list.css');
+$document = Factory::getDocument();
+$document->addStyleSheet(Uri::root() . 'administrator/components/com_tjucm/assets/css/tjucm.css');
+$document->addStyleSheet(Uri::root() . 'media/com_tjucm/css/list.css');
-$user = JFactory::getUser();
+$user = Factory::getUser();
$userId = $user->get('id');
$listOrder = $this->state->get('list.ordering');
$listDirn = $this->state->get('list.direction');
$canOrder = $user->authorise('core.edit.state', 'com_tjucm');
$saveOrder = $listOrder == 'a.`ordering`';
-$client = JFactory::getApplication()->input->get('client');
+$client = Factory::getApplication()->input->get('client');
if ($saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_tjucm&task=items.saveOrderAjax&tmpl=component';
- JHtml::_('sortablelist.sortable', 'itemList', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
+ HTMLHelper::_('sortablelist.sortable', 'itemList', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
$sortFields = $this->getSortFields();
@@ -98,7 +103,7 @@
}
?>
-