diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index 0f3d6d075a5..9158cf0dd92 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -174,7 +174,8 @@ if ($elemid && $action == 'addintocategory' &&
($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_PROJECT && $user->rights->projet->creer)
+ ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer)||
+ ($type == Categorie::TYPE_MEMBER && $user->rights->projet->creer)
)) {
if ($type == Categorie::TYPE_PRODUCT) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -196,6 +197,10 @@ if ($elemid && $action == 'addintocategory' &&
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$newobject = new Project($db);
$elementtype = 'project';
+ } elseif ($type == Categorie::TYPE_MEMBER) {
+ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
+ $newobject = new Adherent($db);
+ $elementtype = 'member';
}
$result = $newobject->fetch($elemid);
@@ -701,6 +706,26 @@ if ($type == Categorie::TYPE_MEMBER) {
if ($prods < 0) {
dol_print_error($db, $object->error, $object->errors);
} else {
+ // Form to add record into a category
+ $showclassifyform = 1;
+ if ($showclassifyform) {
+ print '
';
+ print '