diff --git a/htdocs/don/card.php b/htdocs/don/card.php
index 6478bcee276..eb8c8069ed7 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -877,45 +877,48 @@ if (!empty($id) && $action != 'edit') {
// Actions buttons
print '
';
-
- // Re-open
- if ($permissiontoadd && $object->statut == $object::STATUS_CANCELED) {
- print '
'.$langs->trans("ReOpen").'';
- }
-
- print '
';
-
- if ($object->statut == $object::STATUS_DRAFT) {
- print '
';
- }
-
- if (($object->statut == $object::STATUS_DRAFT || $object->statut == $object::STATUS_VALIDATED) && $totalpaid == 0 && $object->paid == 0) {
- print '
";
- }
-
- // Create payment
- if ($object->statut == $object::STATUS_VALIDATED && $object->paid == 0 && $user->hasRight('don', 'creer')) {
- if ($remaintopay == 0) {
- print '
'.$langs->trans('DoPayment').'
';
- } else {
- print '
';
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
+ if (empty($reshook)) {
+ // Re-open
+ if ($permissiontoadd && $object->statut == $object::STATUS_CANCELED) {
+ print '
'.$langs->trans("ReOpen").'';
}
- }
- // Classify 'paid'
- if ($object->statut == $object::STATUS_VALIDATED && round($remaintopay) == 0 && $object->paid == 0 && $user->hasRight('don', 'creer')) {
- print '
";
- }
+ print '
';
- // Delete
- if ($user->hasRight('don', 'supprimer')) {
- if ($object->statut == $object::STATUS_CANCELED || $object->statut == $object::STATUS_DRAFT) {
- print '
";
- } else {
- print '
";
+ if ($object->statut == $object::STATUS_DRAFT) {
+ print '
';
+ }
+
+ if (($object->statut == $object::STATUS_DRAFT || $object->statut == $object::STATUS_VALIDATED) && $totalpaid == 0 && $object->paid == 0) {
+ print '
";
+ }
+
+ // Create payment
+ if ($object->statut == $object::STATUS_VALIDATED && $object->paid == 0 && $user->hasRight('don', 'creer')) {
+ if ($remaintopay == 0) {
+ print '
'.$langs->trans('DoPayment').'
';
+ } else {
+ print '
';
+ }
+ }
+
+ // Classify 'paid'
+ if ($object->statut == $object::STATUS_VALIDATED && round($remaintopay) == 0 && $object->paid == 0 && $user->hasRight('don', 'creer')) {
+ print '
";
+ }
+
+ // Delete
+ if ($user->hasRight('don', 'supprimer')) {
+ if ($object->statut == $object::STATUS_CANCELED || $object->statut == $object::STATUS_DRAFT) {
+ print '
";
+ } else {
+ print '
";
+ }
+ } else {
+ print '
";
}
- } else {
- print '
";
}
print "
";