diff --git a/view/certificate/certificate_card.php b/view/certificate/certificate_card.php index d1b3359..154d4ec 100644 --- a/view/certificate/certificate_card.php +++ b/view/certificate/certificate_card.php @@ -403,7 +403,7 @@ $displayButton = $onPhone ? '' : '' . ' ' . $langs->trans('Validate'); if ($object->status == SaturneCertificate::STATUS_DRAFT) { print '' . $displayButton . ''; - } else { + } elseif ($object->status < SaturneCertificate::STATUS_DRAFT) { print '' . $displayButton . ''; } @@ -411,7 +411,7 @@ $displayButton = $onPhone ? '' : '' . ' ' . $langs->trans('ReOpenDoli'); if ($object->status == SaturneCertificate::STATUS_VALIDATED) { print '' . $displayButton . ''; - } else { + } elseif ($object->status > SaturneCertificate::STATUS_VALIDATED) { print '' . $displayButton . ''; } diff --git a/view/timesheet/timesheet_card.php b/view/timesheet/timesheet_card.php index f7888f6..33e0761 100644 --- a/view/timesheet/timesheet_card.php +++ b/view/timesheet/timesheet_card.php @@ -796,7 +796,7 @@ $displayButton = $onPhone ? '' : '' . ' ' . $langs->trans('Validate'); if ($object->status == TimeSheet::STATUS_DRAFT && $plannedWorkingTime['minutes'] != 0) { print '' . $displayButton . ''; - } else { + } elseif ($object->status < TimeSheet::STATUS_DRAFT) { print '' . $displayButton . ''; } @@ -804,7 +804,7 @@ $displayButton = $onPhone ? '' : '' . ' ' . $langs->trans('ReOpenDoli'); if ($object->status == TimeSheet::STATUS_VALIDATED) { print '' . $displayButton . ''; - } else { + } elseif ($object->status > TimeSheet::STATUS_VALIDATED) { print '' . $displayButton . ''; }