From 2290ff63802714cdff3fbfa025e812ebf1cec0af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Jan 2005 19:26:38 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Pb=20mise=20a=20jout=20note=20et=20libel?= =?UTF-8?q?l=E9=20d'une=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/actioncomm.class.php | 4 ++-- htdocs/comm/action/fiche.php | 27 +++++++++++++++++---------- htdocs/langs/en_US/commercial.lang | 2 ++ htdocs/langs/fr_FR/commercial.lang | 3 +++ 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index c4d52df07dd..234ad0dd74f 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -91,8 +91,8 @@ class ActionComm $this->priority = 0; } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm (datea, fk_action, fk_soc, fk_user_author, fk_user_action, fk_contact, percent, note,priority,propalrowid) "; - $sql .= " VALUES ('$this->date', $this->type, $this->societe, $author->id,"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm (datea, label, fk_action, fk_soc, fk_user_author, fk_user_action, fk_contact, percent, note,priority,propalrowid) "; + $sql .= " VALUES ('$this->date', '$this->libelle', $this->type, $this->societe, $author->id,"; $sql .= $this->user->id . ", $this->contact, '$this->percent', '$this->note', $this->priority, $this->propalrowid);"; if ($this->db->query($sql) ) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index e8d73269490..f3f0ab292b6 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -74,8 +74,13 @@ if ($_POST["action"] == 'add_action') $actioncomm->type = $_POST["actionid"]; $actioncomm->priority = isset($_POST["priority"])?$_POST["priority"]:0; - $actioncomm->libelle = $_POST["label"]; - + if ($_POST["actionid"] == 5) + { + if ($contact->fullname) { $actioncomm->libelle = $langs->trans("TaskRDVWith",$contact->fullname); } + else { $actioncomm->libelle = $langs->trans("TaskRDV"); } + } else { + $actioncomm->libelle = $_POST["label"]; + } $actioncomm->date = $db->idate(mktime($_POST["heurehour"], $_POST["heuremin"], 0, @@ -111,12 +116,12 @@ if ($_POST["action"] == 'add_action') if ($_POST["actionid"] == 5) { - $libelle = "Rendez-vous avec ".$contact->fullname; - $libelle .= "\n" . $actioncomm->libelle; + $libellecal = "Rendez-vous avec ".$contact->fullname; + $libellecal .= "\n" . $actioncomm->libelle; } else { - $libelle = $actioncomm->libelle; + $libellecal = $actioncomm->libelle; } $webcal->date=mktime($_POST["heurehour"], @@ -126,7 +131,7 @@ if ($_POST["action"] == 'add_action') $_POST["acday"], $_POST["acyear"]); $webcal->texte=$societe->nom; - $webcal->desc=$libelle; + $webcal->desc=$libellecal; } } @@ -262,7 +267,7 @@ if ($_GET["action"] == 'create') add_row_for_webcal_link(); - print ''.$langs->trans("Comment").''; + print ''.$langs->trans("Description").''; print ''; print ''; print ''; @@ -292,7 +297,7 @@ if ($_GET["action"] == 'create') } print ''; - print ''.$langs->trans("Label").''; + print ''.$langs->trans("Label").''; // Societe, contact print ''.$langs->trans("ActionOnCompany").''; @@ -418,6 +423,7 @@ if ($_GET["id"]) print ''; print ''; + print ''; print ''; print ''; @@ -435,7 +441,7 @@ if ($_GET["id"]) if ($act->note) { - print ''; } print ''; @@ -446,6 +452,7 @@ if ($_GET["id"]) // Affichage fiche action en mode visu print '
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Label").''.$act->libelle.'
'.$langs->trans("Company").''.$act->societe->nom.'
'.$langs->trans("Comment").''; + print '
'.$langs->trans("Description").''; print nl2br($act->note).'
'; + print ''; print ''; print ''; @@ -462,7 +469,7 @@ if ($_GET["id"]) if ($act->note) { - print ''; } print '
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Label").''.$act->libelle.'
'.$langs->trans("Company").''.$act->societe->nom_url.'
'.$langs->trans("Comment").''; + print '
'.$langs->trans("Description").''; print nl2br($act->note).'
'; diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang index c7eb1c5b510..2f8a4012dcd 100644 --- a/htdocs/langs/en_US/commercial.lang +++ b/htdocs/langs/en_US/commercial.lang @@ -12,3 +12,5 @@ CardAction=Task card PercentDone=Percentage done ActionOnCompany=Task about company ActionOnContact=Task about contact +TaskRDV=Rendez-vous +TaskRDVWith=Rendez-vous with %s diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang index d9c07a8d369..02c8cf89afb 100644 --- a/htdocs/langs/fr_FR/commercial.lang +++ b/htdocs/langs/fr_FR/commercial.lang @@ -12,3 +12,6 @@ CardAction=Fiche action PercentDone=Pourcentage réalisé ActionOnCompany=Action concernant la société ActionOnContact=Action concernant le contact +TaskRDV=Rendez-vous +TaskRDVWith=Rendez-vous avec %s +