function showFormLifeCycle($openform = true, $closeform = true)
{
if (!self::canView()) {
return false;
}
echo "<div class='spaced'>";
if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
echo "<form method='post' action='" . $this->getFormURL() . "'>";
}
$this->displayLifeCycleMatrix(__('Life cycle of tickets'), '_cycle_ticket', 'ticket_status', Ticket::getAllStatusArray(), $canedit);
$this->displayLifeCycleMatrix(__('Life cycle of problems'), '_cycle_problem', 'problem_status', Problem::getAllStatusArray(), $canedit);
$this->displayLifeCycleMatrix(__('Life cycle of changes'), '_cycle_change', 'change_status', Change::getAllStatusArray(), $canedit);
if ($canedit && $closeform) {
echo "<div class='center'>";
echo "<input type='hidden' name='id' value='" . $this->fields['id'] . "'>";
echo "<input type='submit' name='update' value=\"" . _sx('button', 'Save') . "\" class='submit'>";
echo "</div>\n";
Html::closeForm();
}
echo "</div>";
}