diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index c27de12a53f..a262077e2a3 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -301,7 +301,7 @@ if ($_POST["action"] == 'send' && empty($_POST["cancel"])) { $mil = new Mailing($db); $result=$mil->fetch($_POST["mailid"]); - + $error=0; $upload_dir = $conf->mailing->dir_output . "/" . get_exdir($mil->id,2,0,1); @@ -312,7 +312,7 @@ if ($_POST["action"] == 'send' && empty($_POST["cancel"])) $message='
'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTo")).'
'; $error++; } - + if (! $error) { // Ajout CSS @@ -653,7 +653,7 @@ else $head = emailing_prepare_head($mil); dol_fiche_head($head, 'card', $langs->trans("Mailing"), 0, 'email'); - + if ($message) print $message."
"; // Confirmation de la validation du mailing @@ -728,13 +728,13 @@ else print ''; // From - print ''.$html->editfieldkey("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer,'email').''; - print $html->editfieldval("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer,'email'); + print ''.$html->editfieldkey("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').''; + print $html->editfieldval("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email'); print ''; // Errors to - print ''.$html->editfieldkey("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer,'email').''; - print $html->editfieldval("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer,'email'); + print ''.$html->editfieldkey("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').''; + print $html->editfieldval("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email'); print ''; // Status @@ -757,7 +757,7 @@ else $text=$langs->trans('NotEnoughPermissions'); print $html->textwithpicto($nbemail,$text,1,'warning'); } - + } else {