Add topic of mail in message

This commit is contained in:
Laurent Destailleur 2008-04-24 18:51:29 +00:00
parent 3065772b70
commit a4c3b86d9f
4 changed files with 20 additions and 32 deletions

View File

@ -349,22 +349,16 @@ if ($_POST['action'] == 'send')
if ($_POST['action'] == 'send') if ($_POST['action'] == 'send')
{ {
$subject = $_POST['subject']; if (strlen($_POST['subject'])) $subject = $_POST['subject'];
else $subject = $langs->transnoentities('Propal').' '.$propal->ref;
if($subject == '')
{
$subject = $langs->transnoentities('Propal').' '.$propal->ref;
}
$actiontypecode='AC_PROP'; $actiontypecode='AC_PROP';
$actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n"; $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n";
if ($message) if ($message)
{ {
$actionmsg.=$langs->transnoentities('MailTopic').": ".$subject."\n";
$actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n"; $actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n";
$actionmsg.=$message; $actionmsg.=$message;
} }
$actionmsg2=$langs->transnoentities('Action'.$actiontypecode); $actionmsg2=$langs->transnoentities('Action'.$actiontypecode);
} }

View File

@ -999,32 +999,26 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['c
if ($_POST['action'] == 'send') if ($_POST['action'] == 'send')
{ {
if(strlen($_POST['subject'])) if (strlen($_POST['subject'])) $subject = $_POST['subject'];
{ else $subject = $langs->transnoentities('Bill').' '.$fac->ref;
$subject = $_POST['subject'];
}
else
{
$subject = $langs->trans('Bill').' '.$fac->ref;
}
$actiontypecode='AC_FAC'; $actiontypecode='AC_FAC';
$actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n"; $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n";
if ($message) if ($message)
{ {
$actionmsg.=$langs->transnoentities('MailTopic').": ".$subject."\n";
$actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n"; $actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n";
$actionmsg.=$message; $actionmsg.=$message;
} }
$actionmsg2=$langs->transnoentities('Action'.$actiontypecode); $actionmsg2=$langs->transnoentities('Action'.$actiontypecode);
} }
if ($_POST['action'] == 'relance') 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'; $actiontypecode='AC_FAC';
$actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n"; $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n";
if ($message) { if ($message) {
$actionmsg.=$langs->transnoentities('MailTopic').": ".$subject."\n";
$actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n"; $actionmsg.=$langs->transnoentities('TextUsedInTheMessageBody').":\n";
$actionmsg.=$message; $actionmsg.=$message;
} }

View File

@ -390,10 +390,10 @@ CloseWindow=Close window
Question=Question Question=Question
Response=Response Response=Response
Priority=Priority Priority=Priority
MailSentBy=Mail sent by MailSentBy=Email sent by
TextUsedInTheMessageBody=Text used in the message body TextUsedInTheMessageBody=Email body
SendAcknowledgementByMail=Send Ack. by mail SendAcknowledgementByMail=Send Ack. by email
NoEMail=No EMail NoEMail=No email
Owner=Owner Owner=Owner
DetectedVersion=Detected version DetectedVersion=Detected version
FollowingConstantsWillBeSubstituted=Following constants will be substitute with corresponding value. FollowingConstantsWillBeSubstituted=Following constants will be substitute with corresponding value.

View File

@ -393,7 +393,7 @@ Question=Question
Response=Réponse Response=Réponse
Priority=Priorité Priority=Priorité
MailSentBy=Mail envoyé par MailSentBy=Mail envoyé par
TextUsedInTheMessageBody=Texte utilisé dans le corps du message TextUsedInTheMessageBody=Corps du mail
SendAcknowledgementByMail=Envoi A.R. par mail SendAcknowledgementByMail=Envoi A.R. par mail
NoEMail=Pas d'email NoEMail=Pas d'email
Owner=Propriétaire Owner=Propriétaire