From 68994823dd7738735f848ca9b607f9174b68f8bd Mon Sep 17 00:00:00 2001 From: Cubexed Date: Fri, 12 Sep 2014 18:00:55 +0200 Subject: [PATCH] Closed projects are greyed out in project selector --- htdocs/core/class/html.formprojet.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 4042bb16e31..eafe9d9f166 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -115,12 +115,17 @@ class FormProjets { $disabled=0; $labeltoshow.=' '.dol_trunc($obj->title,$maxlength); - if (! $obj->fk_statut > 0) + if ($obj->fk_statut == 0) { $disabled=1; $labeltoshow.=' - '.$langs->trans("Draft"); } - if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) + else if ($obj->fk_statut == 2) + { + $disabled=1; + $labeltoshow.=' - '.$langs->trans("Closed"); + } + else if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled=1; $labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany");