Profile::showFormToolsHelpdesk PHP Method

showFormToolsHelpdesk() public method

Print the helpdesk right form for the current profile
    function showFormToolsHelpdesk()
    {
        global $CFG_GLPI;
        if (!self::canView()) {
            return false;
        }
        echo "<div class='spaced'>";
        if ($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) {
            echo "<form method='post' action='" . $this->getFormURL() . "'>";
        }
        $matrix_options = array('canedit' => $canedit, 'default_class' => 'tab_bg_2');
        $rights = array(array('rights' => Profile::getRightsFor('KnowbaseItem', 'helpdesk'), 'label' => __('FAQ'), 'field' => 'knowbase'), array('rights' => Profile::getRightsFor('ReservationItem', 'helpdesk'), 'label' => _n('Reservation', 'Reservations', Session::getPluralNumber()), 'field' => 'reservation'), array('rights' => Profile::getRightsFor('Reminder', 'helpdesk'), 'label' => _n('Public reminder', 'Public reminders', Session::getPluralNumber()), 'field' => 'reminder_public'), array('rights' => Profile::getRightsFor('RSSFeed', 'helpdesk'), 'label' => _n('Public RSS feed', 'Public RSS feeds', Session::getPluralNumber()), 'field' => 'rssfeed_public'));
        $matrix_options['title'] = __('Tools');
        $this->displayRightsChoiceMatrix($rights, $matrix_options);
        if ($canedit) {
            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>";
    }