Skip to content

Commit

Permalink
Bug #19 fix: Remove delete functionality from backhand users list vie…
Browse files Browse the repository at this point in the history
…w. (#20)

* Bug #157765 fix: Remove delete functionality from backhand users list view.

* Bug #157765 fix: Remove delete functionality from backhand users list view.

* Bug #157765 fix: Remove delete functionality from backhand users list view.
  • Loading branch information
paritshivani authored Feb 18, 2020
1 parent 63a889c commit 3d5e634
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/components/com_tc/administrator/models/usertcs.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public function getTable($type = 'usertcs', $prefix = 'TcTable', $config = array
*
* @since 1.0.0
*/
/**
public function delete($cid)
{
$db = JFactory::getDbo();
Expand Down Expand Up @@ -228,7 +229,7 @@ public function delete($cid)
return true;
}

*/
/**
* Method to save the user T&C acceptance entry.
*
Expand Down
3 changes: 2 additions & 1 deletion src/components/com_tc/administrator/tables/usertcs.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ public function check()
*
* @return bool
*/
/**
public function delete($pk = null)
{
$this->load($pk);
$result = parent::delete($pk);
return $result;
}

*/
/**
* Method to load a row from the database by primary key and bind the fields to the JTable instance properties.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ protected function addToolbar()
if (isset($this->items[0]))
{
// If this component does not use state then show a direct delete button as we can not trash
JToolBarHelper::deleteList('', 'usertcs.delete', 'JTOOLBAR_DELETE');
//JToolBarHelper::deleteList('', 'usertcs.delete', 'JTOOLBAR_DELETE');
}
}

if ($canDo->get('core.admin'))
{
JToolBarHelper::preferences('com_tc');
}
}
}

0 comments on commit 3d5e634

Please sign in to comment.