If user does not have an email and option “Mailsonde” is active, then we show a warning
This commit is contained in:
parent
2c816e09a5
commit
55014b3338
@ -156,6 +156,11 @@ if ($action == 'edit') {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($object->fk_user_creat) {
|
||||||
|
$userstatic = new User($db);
|
||||||
|
$userstatic->fetch($object->fk_user_creat);
|
||||||
|
}
|
||||||
|
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
$arrayofjs=array();
|
$arrayofjs=array();
|
||||||
@ -215,9 +220,6 @@ print '</td></tr>';
|
|||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans("Author") .'</td><td colspan="2">';
|
print $langs->trans("Author") .'</td><td colspan="2">';
|
||||||
if ($object->fk_user_creat) {
|
if ($object->fk_user_creat) {
|
||||||
$userstatic = new User($db);
|
|
||||||
$userstatic->fetch($object->fk_user_creat);
|
|
||||||
|
|
||||||
print $userstatic->getLoginUrl(1);
|
print $userstatic->getLoginUrl(1);
|
||||||
} else {
|
} else {
|
||||||
print dol_htmlentities($object->nom_admin);
|
print dol_htmlentities($object->nom_admin);
|
||||||
@ -251,7 +253,16 @@ if ($action == 'edit')
|
|||||||
{
|
{
|
||||||
print '<input type="checkbox" name="mailsonde" size="40"'.($object->mailsonde?' checked="true"':'').'">';
|
print '<input type="checkbox" name="mailsonde" size="40"'.($object->mailsonde?' checked="true"':'').'">';
|
||||||
}
|
}
|
||||||
else print yn($object->mailsonde);
|
else {
|
||||||
|
print yn($object->mailsonde);
|
||||||
|
|
||||||
|
//If option is active and linked user does not have an email, we show a warning
|
||||||
|
if ($object->fk_user_creat && $object->mailsonde) {
|
||||||
|
if (!$userstatic->email) {
|
||||||
|
print ' '.img_warning($langs->trans('NoEMail'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Users can comment
|
// Users can comment
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user