static function showMassiveActionsSubForm(MassiveAction $ma)
{
global $CFG_GLPI;
switch ($ma->getAction()) {
case 'add_task':
$itemtype = $ma->getItemtype(true);
$tasktype = $itemtype . 'Task';
if ($ttype = getItemForItemtype($tasktype)) {
$ttype->showFormMassiveAction();
return true;
}
return false;
case 'add_actor':
$types = array(0 => Dropdown::EMPTY_VALUE, CommonITILActor::REQUESTER => __('Requester'), CommonITILActor::OBSERVER => __('Watcher'), CommonITILActor::ASSIGN => __('Assigned to'));
$rand = Dropdown::showFromArray('actortype', $types);
$paramsmassaction = array('actortype' => '__VALUE__');
Ajax::updateItemOnSelectEvent("dropdown_actortype{$rand}", "show_massiveaction_field", $CFG_GLPI["root_doc"] . "/ajax/dropdownMassiveActionAddActor.php", $paramsmassaction);
echo "<span id='show_massiveaction_field'> </span>\n";
return true;
case 'update_notif':
Dropdown::showYesNo('use_notification');
echo "<br><br>";
echo Html::submit(_x('button', 'Post'), array('name' => 'massiveaction'));
return true;
return true;
}
return parent::showMassiveActionsSubForm($ma);
}