Skip to content

Commit 23d52f8

Browse files
authored
[4.1] scheduler toolbar (#36675)
Updates the code for the enaable/disable action buttons for consistency and simplicity with all other similar uses. To test apply the pr, create one or more tasks. Make sure you can enable and disable the tasks from the action dropdown
1 parent 4e191c9 commit 23d52f8

File tree

1 file changed

+2
-2
lines changed
  • administrator/components/com_scheduler/src/View/Tasks

1 file changed

+2
-2
lines changed

administrator/components/com_scheduler/src/View/Tasks/HtmlView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ protected function addToolbar(): void
162162
// Add the batch Enable, Disable and Trash buttons if privileged
163163
if ($canDo->get('core.edit.state'))
164164
{
165-
$childBar->addNew('tasks.publish', 'JTOOLBAR_ENABLE')->listCheck(true)->icon('icon-publish');
166-
$childBar->addNew('tasks.unpublish', 'JTOOLBAR_DISABLE')->listCheck(true)->icon('icon-unpublish');
165+
$childBar->publish('tasks.publish', 'JTOOLBAR_ENABLE')->listCheck(true);
166+
$childBar->unpublish('tasks.unpublish', 'JTOOLBAR_DISABLE')->listCheck(true);
167167

168168
$childBar->checkin('tasks.unlock', 'COM_SCHEDULER_TOOLBAR_UNLOCK')->listCheck(true)->icon('icon-unlock');
169169

0 commit comments

Comments
 (0)