User tests: Successful: Unsuccessful:
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.
This PR just adds the task from the arguments to the button
Adjust for example the code in the categories view to the alternative way like above. The example button would be here:
Works the same, regardless of style.
Only the original code works, the adjusted like above just reloads the page without triggering the task.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
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:
?
?
|
Nice spot! Thanks!
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.