backend_task_edit

Allows adding custom content to the task-editing form.

Teamwork

Input (passed by reference)

$params['task'] object Instance of the tasksTask class corresponding to the task being edited.
$params['action'] object Instance of the tasksTasksEditAction class, which is the PHP action class used to generate the task-editing form.
… your plugin code …

Output

{$backend_task_edit.before_header}
Custom HTML code to be used above the top block.
{$backend_task_edit.header}
Custom HTML code to be used at the bottom of the top block inside the <header> element.
{$backend_task_edit.after_header}
Custom HTML code to be used below the top block.
{$backend_task_edit.before_name}
Custom content to be displayed above the task name editing field.
{$backend_task_edit.name}
Custom content to be displayed before the task name editing field.
{$backend_task_edit.after_name}
Custom content to be displayed below the task name editing field.
{$backend_task_edit.before_description}
Custom HTML code to be used above the task description.
{$backend_task_edit.description}
Custom HTML code to be used at the bottom of the block with the task description.
{$backend_task_edit.after_description}
Custom HTML code to be used below the task description.
{$backend_task_edit.before_attachments}
Custom HTML code to be used above the list of attached files.
{$backend_task_edit.attachments}
Custom HTML code to be used at the bottom of the block with attached files.
{$backend_task_edit.after_attachments}
Custom HTML code to be used below the list of attached files.
{$backend_task_edit.before_buttons}
Custom HTML code to be used above the task action buttons.
{$backend_task_edit.buttons}
Custom HTML code to be used at the bottom of the block with action buttons.
{$backend_task_edit.after_buttons}
Custom HTML code to be used below the task action buttons.
{$backend_task_edit.before_fields}
Custom content to be displayed above list of extra fields in the task editor.
{$backend_task_edit.after_fields}
Custom content to be displayed below list of extra fields in the task editor.
{$backend_task_edit.more}
HTML code of extra fields in the task editor.
Teamwork

Plugin code example

PHP

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

    return [
        'before_header' => 'Custom content above the header',
        'header' => 'Custom content in the header',
        'after_header' => 'Custom content below the header',
        'before_buttons' => 'Custom content above action buttons',
        'buttons' => 'Custom content in the action buttons block',
        'after_buttons' => 'Custom content below action buttons',
        'before_description' => 'Custom content above the description',
        'description' => 'Custom content in the description block',
        'after_description' => 'Custom content below the description',
        'before_attachments' => 'Custom content above attachments',
        'attachments' => 'Custom content in the attachments block',
        'after_attachments' => 'Custom content below attachments',
        'before_hidden_block' => 'Custom content above the comments block',
        'hidden_block' => 'Custom content in the comments block',
        'after_hidden_block' => 'Custom content below the comments block',
        'before_name' => 'Custom content above the task name editing field.',
        'name' => 'Custom content before the task name editing field.',
        'after_name' => 'Custom content above the task name editing field.',
        'before_fields' => 'Custom content above the list of extra fields.',
        'more' => 'HTML code of custom extra fields.',
        'after_fields' => 'Custom content below the list of extra fields.',
    ];
}