diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index c0c6b45464f..d27b6f05808 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -270,7 +270,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } $helptext = ''; - form_constantes($constantes, 3, $helptext); + form_constantes($constantes, 3, $helptext, 'EmailTemplate'); + + print '
'; + print '* '.$langs->trans("GoOntoUserCardToAddMore").'
'; + if (!empty($conf->societe->enabled)) { + print '** '.$langs->trans("GoOntoContactCardToAddMore").'
'; + } + print '
'; print '
'; } else { @@ -316,15 +323,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print ''; print ''; -} - -print '
'; -print '* '.$langs->trans("GoOntoUserCardToAddMore").'
'; -if (!empty($conf->societe->enabled)) { - print '** '.$langs->trans("GoOntoContactCardToAddMore").'
'; + print '
'; + print '* '.$langs->trans("GoOntoUserCardToAddMore").'
'; + if (!empty($conf->societe->enabled)) { + print '** '.$langs->trans("GoOntoContactCardToAddMore").'
'; + } + print '
'; } -print '
'; print ''; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index ae260171a0b..17da39e4f3c 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1529,7 +1529,7 @@ function complete_elementList_with_modules(&$elementList) * @param string $helptext Help * @return void */ -function form_constantes($tableau, $strictw3c = 0, $helptext = '') +function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Value') { global $db, $langs, $conf, $user; global $_Avery_Labels; @@ -1550,7 +1550,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') print ''; print ''.$langs->trans("Description").''; print ''; - $text = $langs->trans("Value"); + $text = $langs->trans($text); print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext'); print ''; if (empty($strictw3c)) { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1484a741e80..78cbff5cafe 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1367,7 +1367,7 @@ AccountCodeManager=Options for automatic generation of customer/vendor accountin NotificationsDesc=Email notifications can be sent automatically for some Dolibarr events.
Recipients of notifications can be defined: NotificationsDescUser=* per user, one user at a time. NotificationsDescContact=* per third-party contacts (customers or vendors), one contact at a time. -NotificationsDescGlobal=* or by setting global email addresses in this setup page. +NotificationsDescGlobal=* or by setting global email addresses in the setup page of the module. ModelModules=Document Templates DocumentModelOdt=Generate documents from OpenDocument templates (.ODT / .ODS files from LibreOffice, OpenOffice, KOffice, TextEdit,...) WatermarkOnDraft=Watermark on draft document diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index 3acad0ac0c3..73c9d817ae8 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -226,13 +226,14 @@ if ($result > 0) { // List of notifications enabled for contacts $sql = "SELECT n.rowid, n.type,"; $sql .= " a.code, a.label,"; - $sql .= " c.rowid as userid, c.lastname, c.firstname, c.email"; + $sql .= " c.rowid as userid, c.entity, c.login, c.lastname, c.firstname, c.email, c.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,"; $sql .= " ".MAIN_DB_PREFIX."notify_def as n,"; $sql .= " ".MAIN_DB_PREFIX."user c"; $sql .= " WHERE a.rowid = n.fk_action"; $sql .= " AND c.rowid = n.fk_user"; $sql .= " AND c.rowid = ".$object->id; + $sql .= " AND c.entity IN (".getEntity('user').')'; $resql = $db->query($sql); if ($resql) { @@ -311,6 +312,9 @@ if ($result > 0) { $userstatic->id = $obj->userid; $userstatic->lastname = $obj->lastname; $userstatic->firstname = $obj->firstname; + $userstatic->email = $obj->email; + $userstatic->statut = $obj->status; + print ''.$userstatic->getNomUrl(1); if ($obj->type == 'email') { if (isValidEmail($obj->email)) {