function showFormManagement($openform = true, $closeform = true)
{
if (!self::canView()) {
return false;
}
echo "<div class='spaced'>";
if (($canedit = Session::haveRightsOr(self::$rightname, array(UPDATE, CREATE, PURGE))) && $openform) {
echo "<form method='post' action='" . $this->getFormURL() . "'>";
}
$matrix_options = array('canedit' => $canedit, 'default_class' => 'tab_bg_2');
$rights = array(array('itemtype' => 'SoftwareLicense', 'label' => _n('License', 'Licenses', Session::getPluralNumber()), 'field' => 'license'), array('itemtype' => 'Contact', 'label' => _n('Contact', 'Contacts', Session::getPluralNumber()) . " / " . _n('Supplier', 'Suppliers', Session::getPluralNumber()), 'field' => 'contact_enterprise'), array('itemtype' => 'Document', 'label' => _n('Document', 'Documents', Session::getPluralNumber()), 'field' => 'document'), array('itemtype' => 'Contract', 'label' => _n('Contract', 'Contracts', Session::getPluralNumber()), 'field' => 'contract'), array('itemtype' => 'Infocom', 'label' => __('Financial and administratives information'), 'field' => 'infocom'), array('itemtype' => 'Budget', 'label' => __('Budget'), 'field' => 'budget'));
$matrix_options['title'] = __('Management');
$this->displayRightsChoiceMatrix($rights, $matrix_options);
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>";
}