show_status_form

Allows adding custom content to the task status change form.

Teamwork

Input (passed by reference)

$params['task'] object Instance of the tasksTask class corresponding to the task being processed.
$params['status_id'] int ID of the status to which the task is being moved.
$params['next_status'] array Information about the status, to which the task is being moved, as an array with the following keys:
$params['next_status']['id'] int Status ID.
$params['next_status']['name'] string Status name.
$params['next_status']['button'] string Caption on the button used to move a task to this status.
$params['next_status']['sort'] int Sort value saved in the statuses settings.
$params['next_status']['icon'] string Icon displayed for tasks in this status.
$params['next_status']['params'] array Status parameters selected in its settings.
… your plugin code …

Output

{$show_status_form}
Custom HTML code to be used at the bottom of the form.
Teamwork

Plugin code example

PHP

public function showStatusForm($params)
{
    /** @var tasksTask */
    $task = $params['task'];

    return sprintf(
        '<div class="fields custom-mb-16"><div class="field"><div class="name">%s</div><div class="value hint">%s</div></div></div>',
        _wp('Hint'),
        sprintf_wp('Special message about task “<strong>%s</strong>”.', waString::escape($task->name))
    );
}