From bbfbb3063d3b311ba1d6df7c3abab9a6fbb83e3d Mon Sep 17 00:00:00 2001 From: aishwarya Date: Mon, 9 Dec 2019 15:12:20 +0530 Subject: [PATCH 1/5] Bug #231 fix: backend>> The title of form view of field group is not apropriate --- admin_language/en-GB/en-GB.com_tjfields.ini | 8 ++++---- administrator/views/group/view.html.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/admin_language/en-GB/en-GB.com_tjfields.ini b/admin_language/en-GB/en-GB.com_tjfields.ini index ce7d994c..2eff90ba 100755 --- a/admin_language/en-GB/en-GB.com_tjfields.ini +++ b/admin_language/en-GB/en-GB.com_tjfields.ini @@ -342,10 +342,10 @@ COM_TJFIELDS_CITY_EXISTS_IN_REGION_COUNTRY="Another city with same name exists i COM_TJFIELDS_TITLE_COMPONENT="Fields" COM_TJFIELDS_TITLE_COMPONENT_GROUPS="Field Groups" -COM_TJFIELDS_ADD_GROUP=" Add new field group" -COM_TJFIELDS_EDIT_GROUP=" Edit field group" -COM_TJFIELDS_ADD_FIELD=" Add new field" -COM_TJFIELDS_EDIT_FIELD=" Edit field" +COM_TJFIELDS_ADD_GROUP="Field Group: Add" +COM_TJFIELDS_EDIT_GROUP="Field Group: Edit" +COM_TJFIELDS_ADD_FIELD="Field: Add" +COM_TJFIELDS_EDIT_FIELD="Field: Edit" COM_TJFIELDS_GROUP_TITLE_ALREADY_EXISTS="Field group with same name already exists" ;validation diff --git a/administrator/views/group/view.html.php b/administrator/views/group/view.html.php index ab54c1da..bf2df19a 100755 --- a/administrator/views/group/view.html.php +++ b/administrator/views/group/view.html.php @@ -75,7 +75,7 @@ protected function addToolbar() $checkedOut = false; } - $component_title = JText::_('COM_TJFIELDS_TITLE_COMPONENT'); + //$component_title = JText::_('COM_TJFIELDS_TITLE_COMPONENT'); if (!empty($client)) { @@ -100,11 +100,11 @@ protected function addToolbar() if (JVERSION >= '3.0') { - JToolbarHelper::title($component_title . $viewTitle, 'pencil-2'); + JToolbarHelper::title($viewTitle, 'pencil-2'); } else { - JToolbarHelper::title($component_title . $viewTitle, 'group.png'); + JToolbarHelper::title($viewTitle, 'group.png'); } // If not checked out, can save the item. From c1e0e72cbe8cdbbd5f219444ce773946fe387025 Mon Sep 17 00:00:00 2001 From: aishwarya Date: Tue, 10 Dec 2019 17:05:59 +0530 Subject: [PATCH 2/5] Bug #231 fix: backend>> The title of form view of field group is not appropriate --- admin_language/en-GB/en-GB.com_tjfields.ini | 19 ++++++---- administrator/views/group/view.html.php | 39 ++++++++++----------- administrator/views/groups/view.html.php | 7 ++-- 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/admin_language/en-GB/en-GB.com_tjfields.ini b/admin_language/en-GB/en-GB.com_tjfields.ini index 09560a56..6bae31a6 100755 --- a/admin_language/en-GB/en-GB.com_tjfields.ini +++ b/admin_language/en-GB/en-GB.com_tjfields.ini @@ -340,12 +340,19 @@ COM_TJFIELDS_FORM_DESC_CITY_CITY_JTEXT_HELP="*You will need to add this constant COM_TJFIELDS_FILTER_SELECT_REGION="- Select Region" COM_TJFIELDS_CITY_EXISTS_IN_REGION_COUNTRY="Another city with same name exists in selcted country and region." -COM_TJFIELDS_TITLE_COMPONENT="Fields" -COM_TJFIELDS_TITLE_COMPONENT_GROUPS="Field Groups" -COM_TJFIELDS_ADD_GROUP=" Add new field group" -COM_TJFIELDS_EDIT_GROUP=" Edit field group" -COM_TJFIELDS_ADD_FIELD=" Add new field" -COM_TJFIELDS_EDIT_FIELD=" Edit field" +COM_TJLMS_COMPONENT="LMS" +COM_JTICKETING_COMPONENT="Ticketing" +COM_TJUCM_COMPONENT="UCM" + +COM_TJFIELDS_COMPONENT="Fields" +COM_TJFIELDS_TITLE_FIELD="Types - Fields" +COM_TJFIELDS_TITLE_GROUPS="Types - Field Groups" + +COM_TJFIELDS_PAGE_ADD_GROUP ="Types - New Field Group" +COM_TJFIELDS_PAGE_EDIT_GROUP ="Types - Edit Field Group" +COM_TJFIELDS_PAGE_ADD_FIELD ="Types - New Field" +COM_TJFIELDS_PAGE_EDIT_FIELD ="Types - Edit Field" + COM_TJFIELDS_GROUP_TITLE_ALREADY_EXISTS="Field group with same name already exists" ;validation diff --git a/administrator/views/group/view.html.php b/administrator/views/group/view.html.php index ab54c1da..c4aef130 100755 --- a/administrator/views/group/view.html.php +++ b/administrator/views/group/view.html.php @@ -75,38 +75,35 @@ protected function addToolbar() $checkedOut = false; } - $component_title = JText::_('COM_TJFIELDS_TITLE_COMPONENT'); + $component_title = ''; if (!empty($client)) { + $client = explode('.', $client); - - if ($client['0'] == 'com_jticketing') + + switch ($client['0']) { - $component_title = JText::_('COM_JTICKETING_COMPONENT'); + case 'com_jticketing' : + $component_title = JText::_('COM_JTICKETING_COMPONENT'); + break; + case 'com_tjlms': + $component_title = JText::_('COM_TJLMS_COMPONENT'); + break; + case 'com_tjucm': + $component_title= JText::_('COM_TJUCM_COMPONENT'); } } - $canDo = TjfieldsHelper::getActions($client['0'], 'group'); + JToolbarHelper::title($component_title.": ". + JText::_('COM_TJFIELDS_PAGE_' . ($checkedOut ? 'VIEW_GROUP' : ($isNew ? 'ADD_GROUP' : 'EDIT_GROUP'))), + 'pencil-2 article-add' + ); - if ($isNew) - { - $viewTitle = JText::_('COM_TJFIELDS_ADD_GROUP'); - } - else - { - $viewTitle = JText::_('COM_TJFIELDS_EDIT_GROUP'); - } - if (JVERSION >= '3.0') - { - JToolbarHelper::title($component_title . $viewTitle, 'pencil-2'); - } - else - { - JToolbarHelper::title($component_title . $viewTitle, 'group.png'); - } + $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 60404fda..5a40f4f9 100755 --- a/administrator/views/groups/view.html.php +++ b/administrator/views/groups/view.html.php @@ -74,8 +74,9 @@ protected function addToolbar() if (!empty($client)) { + $client = explode('.', $client); - + switch ($client['0']) { case 'com_jticketing' : @@ -84,6 +85,8 @@ protected function addToolbar() case 'com_tjlms': $component_title = JText::_('COM_TJLMS_COMPONENT'); break; + case 'com_tjucm': + $component_title= JText::_('COM_TJUCM_COMPONENT'); } } @@ -96,7 +99,7 @@ protected function addToolbar() $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'; From 627e10cb733c3a5e84ce3a918e2c06a6ac6e74c9 Mon Sep 17 00:00:00 2001 From: aishwarya Date: Tue, 10 Dec 2019 17:22:28 +0530 Subject: [PATCH 3/5] Bug #231 fix: backend>> The title of form view of field group is not appropriate --- admin_language/en-GB/en-GB.com_tjfields.ini | 9 +++++++++ administrator/views/group/view.html.php | 2 ++ 2 files changed, 11 insertions(+) diff --git a/admin_language/en-GB/en-GB.com_tjfields.ini b/admin_language/en-GB/en-GB.com_tjfields.ini index 6bae31a6..67eb5fbf 100755 --- a/admin_language/en-GB/en-GB.com_tjfields.ini +++ b/admin_language/en-GB/en-GB.com_tjfields.ini @@ -340,6 +340,7 @@ COM_TJFIELDS_FORM_DESC_CITY_CITY_JTEXT_HELP="*You will need to add this constant COM_TJFIELDS_FILTER_SELECT_REGION="- Select Region" COM_TJFIELDS_CITY_EXISTS_IN_REGION_COUNTRY="Another city with same name exists in selcted country and region." +<<<<<<< HEAD COM_TJLMS_COMPONENT="LMS" COM_JTICKETING_COMPONENT="Ticketing" COM_TJUCM_COMPONENT="UCM" @@ -353,6 +354,14 @@ COM_TJFIELDS_PAGE_EDIT_GROUP ="Types - Edit Field Group" COM_TJFIELDS_PAGE_ADD_FIELD ="Types - New Field" COM_TJFIELDS_PAGE_EDIT_FIELD ="Types - Edit Field" +======= +COM_TJFIELDS_TITLE_COMPONENT="Fields" +COM_TJFIELDS_TITLE_COMPONENT_GROUPS="Field Groups" +COM_TJFIELDS_ADD_GROUP="Field Group: Add" +COM_TJFIELDS_EDIT_GROUP="Field Group: Edit" +COM_TJFIELDS_ADD_FIELD="Field: Add" +COM_TJFIELDS_EDIT_FIELD="Field: Edit" +>>>>>>> origin/Bug#154244 COM_TJFIELDS_GROUP_TITLE_ALREADY_EXISTS="Field group with same name already exists" ;validation diff --git a/administrator/views/group/view.html.php b/administrator/views/group/view.html.php index c4aef130..c3d68afc 100755 --- a/administrator/views/group/view.html.php +++ b/administrator/views/group/view.html.php @@ -76,6 +76,7 @@ protected function addToolbar() } $component_title = ''; + //$component_title = JText::_('COM_TJFIELDS_TITLE_COMPONENT'); if (!empty($client)) { @@ -101,6 +102,7 @@ protected function addToolbar() ); + $canDo = TjfieldsHelper::getActions($client['0'], 'group'); From 84a2000bfc90c423483b62393768543ca07bec4f Mon Sep 17 00:00:00 2001 From: Aishwarya Date: Mon, 16 Dec 2019 11:20:32 +0530 Subject: [PATCH 4/5] 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'); } - - } /** From 0df8d3f276b1f4f03bc1abe2cad93945156479fa Mon Sep 17 00:00:00 2001 From: Aishwarya Date: Mon, 16 Dec 2019 11:45:43 +0530 Subject: [PATCH 5/5] Bug #231 fix: backend>> The title of form view of field group is not appropriate --- administrator/views/group/view.html.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/administrator/views/group/view.html.php b/administrator/views/group/view.html.php index b6e5c6f3..32170962 100755 --- a/administrator/views/group/view.html.php +++ b/administrator/views/group/view.html.php @@ -100,15 +100,6 @@ protected function addToolbar() 'pencil-2 article-add' ); - if (JVERSION >= '3.0') - { - JToolbarHelper::title($viewTitle, 'pencil-2'); - } - else - { - JToolbarHelper::title($viewTitle, 'group.png'); - } - $canDo = TjfieldsHelper::getActions($client['0'], 'group'); // If not checked out, can save the item.