From 84a2000bfc90c423483b62393768543ca07bec4f Mon Sep 17 00:00:00 2001 From: Aishwarya Date: Mon, 16 Dec 2019 11:20:32 +0530 Subject: [PATCH] Bug #231 fix: backend>> The title of form view of field group is not appropriate --- administrator/views/group/view.html.php | 14 ++++++-------- administrator/views/groups/view.html.php | 13 +++++-------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/administrator/views/group/view.html.php b/administrator/views/group/view.html.php index fe779979..b6e5c6f3 100755 --- a/administrator/views/group/view.html.php +++ b/administrator/views/group/view.html.php @@ -75,13 +75,12 @@ protected function addToolbar() $checkedOut = false; } - //$component_title = JText::_('COM_TJFIELDS_TITLE_COMPONENT'); + // $component_title = JText::_('COM_TJFIELDS_TITLE_COMPONENT'); if (!empty($client)) { - $client = explode('.', $client); - + switch ($client['0']) { case 'com_jticketing' : @@ -91,16 +90,16 @@ protected function addToolbar() $component_title = JText::_('COM_TJLMS_COMPONENT'); break; case 'com_tjucm': - $component_title= JText::_('COM_TJUCM_COMPONENT'); + $component_title = JText::_('COM_TJUCM_COMPONENT'); } } - JToolbarHelper::title($component_title.": ". - JText::_('COM_TJFIELDS_PAGE_' . ($checkedOut ? 'VIEW_GROUP' : ($isNew ? 'ADD_GROUP' : 'EDIT_GROUP'))), + JToolbarHelper::title( + $component_title . ": " . + JText::_('COM_TJFIELDS_PAGE_' . ($checkedOut ? 'VIEW_GROUP' : ($isNew ? 'ADD_GROUP' : 'EDIT_GROUP'))), 'pencil-2 article-add' ); - if (JVERSION >= '3.0') { JToolbarHelper::title($viewTitle, 'pencil-2'); @@ -112,7 +111,6 @@ protected function addToolbar() $canDo = TjfieldsHelper::getActions($client['0'], 'group'); - // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || ($canDo->get('core.create')))) { diff --git a/administrator/views/groups/view.html.php b/administrator/views/groups/view.html.php index daa797de..3ee65562 100755 --- a/administrator/views/groups/view.html.php +++ b/administrator/views/groups/view.html.php @@ -40,7 +40,7 @@ public function display($tpl = null) $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->filterForm = $this->get('FilterForm'); - $this->activeFilters = $this->get('ActiveFilters'); + $this->activeFilters = $this->get('ActiveFilters'); // Check for errors. if (count($errors = $this->get('Errors'))) @@ -76,9 +76,8 @@ protected function addToolbar() if (!empty($client)) { - $client = explode('.', $client); - + switch ($client['0']) { case 'com_jticketing' : @@ -88,7 +87,7 @@ protected function addToolbar() $component_title = JText::_('COM_TJLMS_COMPONENT'); break; case 'com_tjucm': - $component_title= JText::_('COM_TJUCM_COMPONENT'); + $component_title = JText::_('COM_TJUCM_COMPONENT'); } } @@ -98,10 +97,10 @@ protected function addToolbar() } $state = $this->get('State'); - $tjfieldsHelper = new TjfieldsHelper(); + $tjfieldsHelper = new TjfieldsHelper; $canDo = $tjfieldsHelper->getActions($client[0], 'group'); - JToolBarHelper::title($component_title .": ". JText::_('COM_TJFIELDS_TITLE_GROUPS'), 'list.png'); + JToolBarHelper::title($component_title . ": " . JText::_('COM_TJFIELDS_TITLE_GROUPS'), 'list.png'); // Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/group'; @@ -153,8 +152,6 @@ protected function addToolbar() { JToolBarHelper::preferences('com_tjfields'); } - - } /**