From 2857d7cfdaedd0e0d77ff1211c13e314d283aa3e Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 11 Oct 2015 21:00:41 +0200 Subject: [PATCH] Correct --- htdocs/hrm/class/establishment.class.php | 40 ++++++++++++------------ htdocs/hrm/establishment/card.php | 26 +++++++-------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index dccb2d6d37e..c5ba77fd547 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -40,7 +40,7 @@ class Establishment extends CommonObject var $address; var $zip; var $town; - var $statut; // 0=open, 1=closed + var $status; // 0=open, 1=closed var $entity; var $statuts=array(); @@ -82,7 +82,7 @@ class Establishment extends CommonObject $sql.= ", address"; $sql.= ", zip"; $sql.= ", town"; - $sql.= ", statut"; + $sql.= ", status"; $sql.= ", entity"; $sql.= ", datec"; $sql.= ", fk_user_author"; @@ -91,7 +91,7 @@ class Establishment extends CommonObject $sql.= ", '".$this->address."'"; $sql.= ", '".$this->zip."'"; $sql.= ", '".$this->town."'"; - $sql.= ", ".$this->statut; + $sql.= ", ".$this->status; $sql.= ", ".$conf->entity; $sql.= ", '".$this->db->idate($now)."'"; $sql.= ", ". $user->id; @@ -148,7 +148,7 @@ class Establishment extends CommonObject $sql .= ", address = '".$this->address."'"; $sql .= ", zip = '".$this->zip."'"; $sql .= ", town = '".$this->town."'"; - $sql .= ", statut = '".$this->statut."'"; + $sql .= ", status = '".$this->status."'"; $sql .= ", fk_user_mod = " . $user->id; $sql .= " WHERE rowid = ".$this->id; @@ -172,7 +172,7 @@ class Establishment extends CommonObject */ function fetch($id) { - $sql = "SELECT rowid, name, address, zip, town, statut"; + $sql = "SELECT rowid, name, address, zip, town, status"; $sql.= " FROM ".MAIN_DB_PREFIX."establishment"; $sql.= " WHERE rowid = ".$id; @@ -187,7 +187,7 @@ class Establishment extends CommonObject $this->address = $obj->address; $this->zip = $obj->zip; $this->town = $obj->town; - $this->statut = $obj->statut; + $this->status = $obj->status; return 1; } @@ -231,49 +231,49 @@ class Establishment extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatus($mode=0) { - return $this->LibStatut($this->statut,$mode); + return $this->LibStatus($this->status,$mode); } /** * Give a label from a status * - * @param int $statut Id status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatus($status,$mode=0) { global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } if ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]); - if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut8').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]),'status4').' '.$langs->trans($this->statuts_short[$status]); + if ($status==1) return img_picto($langs->trans($this->statuts_short[$status]),'status8').' '.$langs->trans($this->statuts_short[$status]); } if ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); - if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut8'); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'status4'); + if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'status8'); } if ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); - if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut8').' '.$langs->trans($this->statuts[$statut]); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'status4').' '.$langs->trans($this->statuts[$status]); + if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'status8').' '.$langs->trans($this->statuts[$status]); } if ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); - if ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut8'); + if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'status4'); + if ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'status8'); } } diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 3df1e1cf3d6..533ad5117ff 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -38,13 +38,13 @@ $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm','alpha'); $id = GETPOST('id','int'); -// List of statut -static $tmpstatut2label=array( +// List of status +static $tmpstatus2label=array( '0'=>'OpenEtablishment', '1'=>'CloseEtablishment' ); -$statut2label=array(''); -foreach ($tmpstatut2label as $key => $val) $statut2label[$key]=$langs->trans($val); +$status2label=array(''); +foreach ($tmpstatus2label as $key => $val) $status2label[$key]=$langs->trans($val); $object = new Establishment($db); @@ -93,7 +93,7 @@ else if ($action == 'add') $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); $object->fk_pays = $object->country_id; - $object->statut = GETPOST('statut','int'); + $object->status = GETPOST('status','int'); $object->fk_user_author = $user->id; $object->datec = dol_now(); @@ -234,11 +234,11 @@ if ($action == 'create') print ''; print ''; - // Statut + // Status print ''; - print ''; + print ''; print ''; - print $form->selectarray('statut',$statut2label,GETPOST('statut')); + print $form->selectarray('status',$status2label,GETPOST('status')); print ''; print ''; @@ -311,9 +311,9 @@ else if ($id) print ''; print ''; - // Statut - print ''; - print $form->selectarray('statut',$statut2label,$object->statut); + // Status + print ''; + print $form->selectarray('status',$status2label,$object->status); print ''; print ''; @@ -382,8 +382,8 @@ else if ($id) print ''.getCountry($object->fk_pays,1).''; print ''; - // Statut - print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; + // Status + print ''.$langs->trans("Status").''.$object->getLibStatus(4).''; print "";