From 2719cd72ab002d64bbfaab90487e6c2cd0887b61 Mon Sep 17 00:00:00 2001 From: Nicolas Domenech Date: Tue, 12 Sep 2023 13:59:37 +0200 Subject: [PATCH] #506 [IHM] add: picto unlock --- view/certificate/certificate_card.php | 4 ++-- view/timesheet/timesheet_card.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 . ''; }