Skip to content

Commit

Permalink
Bug techjoomla#231 fix: backend>> The title of form view of field gro…
Browse files Browse the repository at this point in the history
…up is not appropriate
  • Loading branch information
Aishwarya committed Dec 16, 2019
1 parent 374d997 commit 84a2000
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
14 changes: 6 additions & 8 deletions administrator/views/group/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' :
Expand All @@ -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');
Expand All @@ -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'))))
{
Expand Down
13 changes: 5 additions & 8 deletions administrator/views/groups/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')))
Expand Down Expand Up @@ -76,9 +76,8 @@ protected function addToolbar()

if (!empty($client))
{

$client = explode('.', $client);

switch ($client['0'])
{
case 'com_jticketing' :
Expand All @@ -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');
}
}

Expand All @@ -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';
Expand Down Expand Up @@ -153,8 +152,6 @@ protected function addToolbar()
{
JToolBarHelper::preferences('com_tjfields');
}


}

/**
Expand Down

0 comments on commit 84a2000

Please sign in to comment.