diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index 94e31fc24ba..a74e19648ea 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -1619,131 +1619,133 @@ else
* Hotbar
*/
print '
';
-
- if ($action != 'valid' && $action != 'editlogin' && $action != 'editthirdparty')
- {
- // Modify
- if ($user->rights->adherent->creer)
- {
- print '
";
- }
- else
- {
- print '
'.$langs->trans("Modify").'
';
- }
-
- // Validate
- if ($object->statut == -1)
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
+ if (empty($reshook)) {
+ if ($action != 'valid' && $action != 'editlogin' && $action != 'editthirdparty')
{
+ // Modify
if ($user->rights->adherent->creer)
{
- print '
\n";
+ print '
";
}
else
{
- print '
'.$langs->trans("Validate").'
';
+ print '
'.$langs->trans("Modify").'
';
}
- }
-
- // Reactivate
- if ($object->statut == 0)
- {
+
+ // Validate
+ if ($object->statut == -1)
+ {
+ if ($user->rights->adherent->creer)
+ {
+ print '
\n";
+ }
+ else
+ {
+ print '
'.$langs->trans("Validate").'
';
+ }
+ }
+
+ // Reactivate
+ if ($object->statut == 0)
+ {
+ if ($user->rights->adherent->creer)
+ {
+ print '
\n";
+ }
+ else
+ {
+ print '
'.$langs->trans("Reenable")."
";
+ }
+ }
+
+ // Send card by email
if ($user->rights->adherent->creer)
{
- print '
\n";
+ if ($object->statut >= 1)
+ {
+ if ($object->email) print '
\n";
+ else print '
\n";
+ }
+ else
+ {
+ print '
'.$langs->trans("SendCardByMail")."
";
+ }
}
else
{
- print '
'.$langs->trans("Reenable")."
";
+ print '
'.$langs->trans("SendCardByMail")."
";
}
- }
-
- // Send card by email
- if ($user->rights->adherent->creer)
- {
+
+ // Terminate
if ($object->statut >= 1)
{
- if ($object->email) print '
\n";
- else print '
\n";
+ if ($user->rights->adherent->supprimer)
+ {
+ print '
\n";
+ }
+ else
+ {
+ print '
'.$langs->trans("Resiliate")."
";
+ }
}
- else
+
+ // Create third party
+ if (! empty($conf->societe->enabled) && ! $object->fk_soc)
{
- print '
'.$langs->trans("SendCardByMail")."
";
+ if ($user->rights->societe->creer)
+ {
+ if ($object->statut != -1) print '
';
+ else print '
';
+ }
+ else
+ {
+ print '
'.$langs->trans("CreateDolibarrThirdParty")."
";
+ }
}
- }
- else
- {
- print '
'.$langs->trans("SendCardByMail")."
";
- }
-
- // Terminate
- if ($object->statut >= 1)
- {
+
+ // Create user
+ if (! $user->societe_id && ! $object->user_id)
+ {
+ if ($user->rights->user->user->creer)
+ {
+ if ($object->statut != -1) print '
';
+ else print '
';
+ }
+ else
+ {
+ print '
'.$langs->trans("CreateDolibarrLogin")."
";
+ }
+ }
+
+ // Delete
if ($user->rights->adherent->supprimer)
{
- print '
\n";
+ print '
\n";
}
else
{
- print '
'.$langs->trans("Resiliate")."
";
+ print '
'.$langs->trans("Delete")."
";
}
- }
-
- // Create third party
- if (! empty($conf->societe->enabled) && ! $object->fk_soc)
- {
- if ($user->rights->societe->creer)
+
+ // Action SPIP
+ if (! empty($conf->mailmanspip->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP))
{
- if ($object->statut != -1) print '
';
- else print '
';
- }
- else
- {
- print '
'.$langs->trans("CreateDolibarrThirdParty")."
";
+ $isinspip = $mailmanspip->is_in_spip($object);
+
+ if ($isinspip == 1)
+ {
+ print '
\n";
+ }
+ if ($isinspip == 0)
+ {
+ print '
\n";
+ }
}
+
}
-
- // Create user
- if (! $user->societe_id && ! $object->user_id)
- {
- if ($user->rights->user->user->creer)
- {
- if ($object->statut != -1) print '
';
- else print '
';
- }
- else
- {
- print '
'.$langs->trans("CreateDolibarrLogin")."
";
- }
- }
-
- // Delete
- if ($user->rights->adherent->supprimer)
- {
- print '
\n";
- }
- else
- {
- print '
'.$langs->trans("Delete")."
";
- }
-
- // Action SPIP
- if (! empty($conf->mailmanspip->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP))
- {
- $isinspip = $mailmanspip->is_in_spip($object);
-
- if ($isinspip == 1)
- {
- print '
\n";
- }
- if ($isinspip == 0)
- {
- print '
\n";
- }
- }
-
}
-
print '
';
if ($isinspip == -1)