? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
22 Jan 2020

In J4.0 we have a new Toolbar class which helps creating the buttons in the various backend views.
In core, it is used like this to create a button

$toolbar->standardButton('refresh')
	->text('JTOOLBAR_REBUILD')
	->task('categories.rebuild');

Now the IDE and also the class itself suggest a different writing like this:
standardButton(string $name = '', string $text = '', string $task = '')

So the above code would look like this;
$toolbar->standardButton('refresh', 'JTOOLBAR_REBUILD', 'categories.rebuild');

However this currently only works partially: Name and text works, but task is ignored.

Summary of Changes

This PR just adds the task from the arguments to the button

Testing Instructions

Adjust for example the code in the categories view to the alternative way like above. The example button would be here:

$toolbar->standardButton('refresh')
->text('JTOOLBAR_REBUILD')
->task('categories.rebuild');

Expected result

Works the same, regardless of style.

Actual result

Only the original code works, the adjusted like above just reloads the page without triggering the task.

Documentation Changes Required

None.

avatar Bakual Bakual - open - 22 Jan 2020
avatar Bakual Bakual - change - 22 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jan 2020
Category Libraries
avatar Bakual Bakual - change - 22 Jan 2020
The description was changed
avatar Bakual Bakual - edited - 22 Jan 2020
avatar richard67 richard67 - test_item - 23 Jan 2020 - Tested successfully
avatar richard67
richard67 - comment - 23 Jan 2020

I have tested this item successfully on 8432606


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27602.

avatar jwaisner jwaisner - test_item - 23 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 23 Jan 2020

I have tested this item successfully on 8432606


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27602.

avatar Quy Quy - change - 23 Jan 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 23 Jan 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27602.

avatar wilsonge wilsonge - close - 24 Jan 2020
avatar wilsonge wilsonge - merge - 24 Jan 2020
avatar wilsonge wilsonge - change - 24 Jan 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-01-24 11:23:27
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge
wilsonge - comment - 24 Jan 2020

Nice spot! Thanks!

Add a Comment

Login with GitHub to post a comment