diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 304eccf9bb7..203c6bd9f84 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3194,19 +3194,16 @@ class Propal extends CommonObject } $statuttrans=''; - if ($statut==self::STATUS_DRAFT) $statuttrans='statut0'; - elseif ($statut==self::STATUS_VALIDATED) $statuttrans='statut1'; - elseif ($statut==self::STATUS_SIGNED) $statuttrans='statut3'; - elseif ($statut==self::STATUS_NOTSIGNED) $statuttrans='statut5'; - elseif ($statut==self::STATUS_BILLED) $statuttrans='statut6'; + if ($statut==self::STATUS_DRAFT) $statuttrans='status0'; + elseif ($statut==self::STATUS_VALIDATED) $statuttrans='status1'; + elseif ($statut==self::STATUS_SIGNED) $statuttrans='status3'; + elseif ($statut==self::STATUS_NOTSIGNED) $statuttrans='status5'; + elseif ($statut==self::STATUS_BILLED) $statuttrans='status6'; - if ($mode == 0) return $this->labelstatut[$statut]; - elseif ($mode == 1) return $this->labelstatut_short[$statut]; - elseif ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut]; - elseif ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans); - elseif ($mode == 4) return img_picto($this->labelstatut[$statut], $statuttrans).' '.$this->labelstatut[$statut]; - elseif ($mode == 5) return ''.$this->labelstatut_short[$statut].' '.img_picto($this->labelstatut[$statut], $statuttrans); - elseif ($mode == 6) return ''.$this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], $statuttrans); + + return dolGetStatus($this->labelstatut[$statut], $this->labelstatut_short[$statut], '', $statuttrans, $mode); + + } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8c6b4c69f82..3144286a6c7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8012,7 +8012,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st if($displayMode==0){ $return = !empty($html)?$html:$statusLabel; } - elseif($displayMode===1){ + elseif($displayMode==1){ $return = !empty($html)?$html:(!empty($statusLabelShort)?$statusLabelShort:$statusLabel); } // use status with images @@ -8047,7 +8047,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st } // Use new badge - if(!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)){ + elseif(!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)){ $statusLabelShort = !empty($statusLabelShort)?$statusLabelShort:$statusLabel; @@ -8064,7 +8064,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st } - return $return; + return $return.$displayMode; }