Fix: EMail from and errrors to must not be editable when email is sent
This commit is contained in:
parent
2c2c08e18c
commit
0e82e249a5
@ -301,7 +301,7 @@ if ($_POST["action"] == 'send' && empty($_POST["cancel"]))
|
|||||||
{
|
{
|
||||||
$mil = new Mailing($db);
|
$mil = new Mailing($db);
|
||||||
$result=$mil->fetch($_POST["mailid"]);
|
$result=$mil->fetch($_POST["mailid"]);
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$upload_dir = $conf->mailing->dir_output . "/" . get_exdir($mil->id,2,0,1);
|
$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='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTo")).'</div>';
|
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTo")).'</div>';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// Ajout CSS
|
// Ajout CSS
|
||||||
@ -653,7 +653,7 @@ else
|
|||||||
$head = emailing_prepare_head($mil);
|
$head = emailing_prepare_head($mil);
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("Mailing"), 0, 'email');
|
dol_fiche_head($head, 'card', $langs->trans("Mailing"), 0, 'email');
|
||||||
|
|
||||||
if ($message) print $message."<br>";
|
if ($message) print $message."<br>";
|
||||||
|
|
||||||
// Confirmation de la validation du mailing
|
// Confirmation de la validation du mailing
|
||||||
@ -728,13 +728,13 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// From
|
// From
|
||||||
print '<tr><td>'.$html->editfieldkey("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer,'email').'</td><td colspan="3">';
|
print '<tr><td>'.$html->editfieldkey("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').'</td><td colspan="3">';
|
||||||
print $html->editfieldval("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 && $mil->statut < 3,'email');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Errors to
|
// Errors to
|
||||||
print '<tr><td>'.$html->editfieldkey("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer,'email').'</td><td colspan="3">';
|
print '<tr><td>'.$html->editfieldkey("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').'</td><td colspan="3">';
|
||||||
print $html->editfieldval("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 && $mil->statut < 3,'email');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
@ -757,7 +757,7 @@ else
|
|||||||
$text=$langs->trans('NotEnoughPermissions');
|
$text=$langs->trans('NotEnoughPermissions');
|
||||||
print $html->textwithpicto($nbemail,$text,1,'warning');
|
print $html->textwithpicto($nbemail,$text,1,'warning');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user