diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index 7ccd80eb4bd..0f3d6d075a5 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -173,7 +173,8 @@ if ($elemid && $action == 'addintocategory' &&
(($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer)) ||
($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) ||
($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) ||
- ($type == Categorie::TYPE_TICKET && $user->rights->ticket->write)
+ ($type == Categorie::TYPE_TICKET && $user->rights->ticket->write) ||
+ ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer)
)) {
if ($type == Categorie::TYPE_PRODUCT) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -191,6 +192,10 @@ if ($elemid && $action == 'addintocategory' &&
require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
$newobject = new Ticket($db);
$elementtype = 'ticket';
+ } elseif ($type == Categorie::TYPE_PROJECT) {
+ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+ $newobject = new Project($db);
+ $elementtype = 'project';
}
$result = $newobject->fetch($elemid);
@@ -874,6 +879,26 @@ if ($type == Categorie::TYPE_PROJECT) {
if ($objects < 0) {
dol_print_error($db, $object->error, $object->errors);
} else {
+ // Form to add record into a category
+ $showclassifyform = 1;
+ if ($showclassifyform) {
+ print '
';
+ print '