Debug notification module
This commit is contained in:
parent
7207ae2cae
commit
f51bcf0038
@ -270,7 +270,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$helptext = '';
|
$helptext = '';
|
||||||
form_constantes($constantes, 3, $helptext);
|
form_constantes($constantes, 3, $helptext, 'EmailTemplate');
|
||||||
|
|
||||||
|
print '<div class="opacitymedium">';
|
||||||
|
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
|
||||||
|
if (!empty($conf->societe->enabled)) {
|
||||||
|
print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
||||||
|
}
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></div>';
|
print '<div class="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></div>';
|
||||||
} else {
|
} else {
|
||||||
@ -316,15 +323,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
|
||||||
|
|
||||||
|
print '<div class="opacitymedium">';
|
||||||
print '<div class="opacitymedium">';
|
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
|
||||||
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
|
if (!empty($conf->societe->enabled)) {
|
||||||
if (!empty($conf->societe->enabled)) {
|
print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
||||||
print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
}
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|||||||
@ -1529,7 +1529,7 @@ function complete_elementList_with_modules(&$elementList)
|
|||||||
* @param string $helptext Help
|
* @param string $helptext Help
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_constantes($tableau, $strictw3c = 0, $helptext = '')
|
function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Value')
|
||||||
{
|
{
|
||||||
global $db, $langs, $conf, $user;
|
global $db, $langs, $conf, $user;
|
||||||
global $_Avery_Labels;
|
global $_Avery_Labels;
|
||||||
@ -1550,7 +1550,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '')
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="">'.$langs->trans("Description").'</td>';
|
print '<td class="">'.$langs->trans("Description").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$text = $langs->trans("Value");
|
$text = $langs->trans($text);
|
||||||
print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext');
|
print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (empty($strictw3c)) {
|
if (empty($strictw3c)) {
|
||||||
|
|||||||
@ -1367,7 +1367,7 @@ AccountCodeManager=Options for automatic generation of customer/vendor accountin
|
|||||||
NotificationsDesc=Email notifications can be sent automatically for some Dolibarr events.<br>Recipients of notifications can be defined:
|
NotificationsDesc=Email notifications can be sent automatically for some Dolibarr events.<br>Recipients of notifications can be defined:
|
||||||
NotificationsDescUser=* per user, one user at a time.
|
NotificationsDescUser=* per user, one user at a time.
|
||||||
NotificationsDescContact=* per third-party contacts (customers or vendors), one contact 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
|
ModelModules=Document Templates
|
||||||
DocumentModelOdt=Generate documents from OpenDocument templates (.ODT / .ODS files from LibreOffice, OpenOffice, KOffice, TextEdit,...)
|
DocumentModelOdt=Generate documents from OpenDocument templates (.ODT / .ODS files from LibreOffice, OpenOffice, KOffice, TextEdit,...)
|
||||||
WatermarkOnDraft=Watermark on draft document
|
WatermarkOnDraft=Watermark on draft document
|
||||||
|
|||||||
@ -226,13 +226,14 @@ if ($result > 0) {
|
|||||||
// List of notifications enabled for contacts
|
// List of notifications enabled for contacts
|
||||||
$sql = "SELECT n.rowid, n.type,";
|
$sql = "SELECT n.rowid, n.type,";
|
||||||
$sql .= " a.code, a.label,";
|
$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 .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
||||||
$sql .= " ".MAIN_DB_PREFIX."notify_def as n,";
|
$sql .= " ".MAIN_DB_PREFIX."notify_def as n,";
|
||||||
$sql .= " ".MAIN_DB_PREFIX."user c";
|
$sql .= " ".MAIN_DB_PREFIX."user c";
|
||||||
$sql .= " WHERE a.rowid = n.fk_action";
|
$sql .= " WHERE a.rowid = n.fk_action";
|
||||||
$sql .= " AND c.rowid = n.fk_user";
|
$sql .= " AND c.rowid = n.fk_user";
|
||||||
$sql .= " AND c.rowid = ".$object->id;
|
$sql .= " AND c.rowid = ".$object->id;
|
||||||
|
$sql .= " AND c.entity IN (".getEntity('user').')';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
@ -311,6 +312,9 @@ if ($result > 0) {
|
|||||||
$userstatic->id = $obj->userid;
|
$userstatic->id = $obj->userid;
|
||||||
$userstatic->lastname = $obj->lastname;
|
$userstatic->lastname = $obj->lastname;
|
||||||
$userstatic->firstname = $obj->firstname;
|
$userstatic->firstname = $obj->firstname;
|
||||||
|
$userstatic->email = $obj->email;
|
||||||
|
$userstatic->statut = $obj->status;
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$userstatic->getNomUrl(1);
|
print '<tr class="oddeven"><td>'.$userstatic->getNomUrl(1);
|
||||||
if ($obj->type == 'email') {
|
if ($obj->type == 'email') {
|
||||||
if (isValidEmail($obj->email)) {
|
if (isValidEmail($obj->email)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user