From a4c3b86d9fad0d8890ba9efe64dc2683f3fa1171 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Apr 2008 18:51:29 +0000 Subject: [PATCH] Add topic of mail in message --- htdocs/comm/propal.php | 22 ++++++++-------------- htdocs/compta/facture.php | 20 +++++++------------- htdocs/langs/en_US/main.lang | 8 ++++---- htdocs/langs/fr_FR/main.lang | 2 +- 4 files changed, 20 insertions(+), 32 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index c996b01a84c..e946aeb2012 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -349,22 +349,16 @@ if ($_POST['action'] == 'send') if ($_POST['action'] == 'send') { - $subject = $_POST['subject']; - - if($subject == '') - { - $subject = $langs->transnoentities('Propal').' '.$propal->ref; - } - + if (strlen($_POST['subject'])) $subject = $_POST['subject']; + else $subject = $langs->transnoentities('Propal').' '.$propal->ref; $actiontypecode='AC_PROP'; $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n"; - - if ($message) - { - $actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n"; - $actionmsg.=$message; - } - + if ($message) + { + $actionmsg.=$langs->transnoentities('MailTopic').": ".$subject."\n"; + $actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n"; + $actionmsg.=$message; + } $actionmsg2=$langs->transnoentities('Action'.$actiontypecode); } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 720154d54d2..bb543a47f8a 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -999,32 +999,26 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['c if ($_POST['action'] == 'send') { - if(strlen($_POST['subject'])) - { - $subject = $_POST['subject']; - } - else - { - $subject = $langs->trans('Bill').' '.$fac->ref; - } - + if (strlen($_POST['subject'])) $subject = $_POST['subject']; + else $subject = $langs->transnoentities('Bill').' '.$fac->ref; $actiontypecode='AC_FAC'; $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n"; - if ($message) { + $actionmsg.=$langs->transnoentities('MailTopic').": ".$subject."\n"; $actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n"; $actionmsg.=$message; } - $actionmsg2=$langs->transnoentities('Action'.$actiontypecode); } if ($_POST['action'] == 'relance') { - $subject = 'Relance facture '.$fac->ref; + if (strlen($_POST['subject'])) $subject = $_POST['subject']; + else $subject = $langs->transnoentities('Relance facture '.$fac->ref); $actiontypecode='AC_FAC'; $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n"; if ($message) { + $actionmsg.=$langs->transnoentities('MailTopic').": ".$subject."\n"; $actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n"; $actionmsg.=$message; } @@ -1063,7 +1057,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['c $fac->actionmsg = $actionmsg; $fac->actionmsg2= $actionmsg2; $fac->facid=$fac->id; - + // Appel des triggers include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); $interface=new Interfaces($db); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 699234c34f8..3f57e229c6e 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -390,10 +390,10 @@ CloseWindow=Close window Question=Question Response=Response Priority=Priority -MailSentBy=Mail sent by -TextUsedInTheMessageBody=Text used in the message body -SendAcknowledgementByMail=Send Ack. by mail -NoEMail=No EMail +MailSentBy=Email sent by +TextUsedInTheMessageBody=Email body +SendAcknowledgementByMail=Send Ack. by email +NoEMail=No email Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=Following constants will be substitute with corresponding value. diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index c9b7ada68ba..0f3ccf13138 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -393,7 +393,7 @@ Question=Question Response=Réponse Priority=Priorité MailSentBy=Mail envoyé par -TextUsedInTheMessageBody=Texte utilisé dans le corps du message +TextUsedInTheMessageBody=Corps du mail SendAcknowledgementByMail=Envoi A.R. par mail NoEMail=Pas d'email Owner=Propriétaire