add reminder by sms (#35236)

* add reminder by sms

* fix url dolistore
This commit is contained in:
Frédéric FRANCE
2025-09-05 12:03:14 +02:00
committed by GitHub
parent 617e922a3a
commit a1be1ff6bd
4 changed files with 75 additions and 49 deletions

View File

@@ -268,6 +268,23 @@ if (!isModEnabled('cron')) {
}
}
// AGENDA REMINDER SMS
print '<tr class="oddeven">'."\n";
print '<td>';
print $langs->trans('AGENDA_REMINDER_SMS').'<br>';
print '<span class="opacitymedium">'.$langs->trans('AGENDA_REMINDER_SMSHelp').'</span>';
print '</td>'."\n";
print '<td class="center">&nbsp;</td>'."\n";
print '<td class="right nowraponall">'."\n";
if (!getDolGlobalString('AGENDA_REMINDER_SMS')) {
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_SMS&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
print '</td></tr>'."\n";
} else {
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_SMS&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
print '</td></tr>'."\n";
}
// AGENDA DEFAULT REMINDER EVENT TYPE
if (getDolGlobalString('AGENDA_REMINDER_EMAIL')) {
print '<tr class="oddeven">'."\n";

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -169,7 +169,7 @@ asort($listofmethods);
if (!count($listofmethods)) {
$descnosms = $langs->trans("NoSmsEngine", '{Dolistore}');
$descnosms = str_replace('{Dolistore}', '<a href="https://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>', $descnosms);
$descnosms = str_replace('{Dolistore}', '<a href="https://www.dolistore.com/index.php?controller=search&orderby=position&orderway=desc&website=marketplace&search_query=smsmanager">DoliStore</a>', $descnosms);
print '<div class="warning">'.$descnosms.'</div>';
}

View File

@@ -99,7 +99,7 @@ if ($fulldayevent) {
$datep = dol_mktime($aphour, $apmin, 0, GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel');
$datef = dol_mktime($p2hour, $p2min, 59, GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel');
}
$reg = array();
$reg = [];
if (GETPOST('datep')) {
if (GETPOST('datep') == 'now') {
$datep = dol_now();
@@ -166,13 +166,20 @@ if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
$TRemindTypes = array();
$TRemindTypes = [];
if (getDolGlobalString('AGENDA_REMINDER_BROWSER')) {
$TRemindTypes['browser'] = array('label' => $langs->trans('BrowserPush'), 'disabled' => (getDolGlobalString('AGENDA_REMINDER_BROWSER') ? 0 : 1));
}
if (getDolGlobalString('AGENDA_REMINDER_EMAIL')) {
$TRemindTypes['email'] = array('label' => $langs->trans('EMail'), 'disabled' => (getDolGlobalString('AGENDA_REMINDER_EMAIL') ? 0 : 1));
}
if (getDolGlobalString('AGENDA_REMINDER_SMS')) {
$langs->load('sms');
$TRemindTypes['sms'] = [
'label' => $langs->trans('Sms'),
'disabled' => (getDolGlobalString('MAIN_SMS_SENDMODE') ? 0 : 1),
];
}
$TDurationTypes = array('y' => $langs->trans('Years'), 'm' => $langs->trans('Month'), 'w' => $langs->trans('Weeks'), 'd' => $langs->trans('Days'), 'h' => $langs->trans('Hours'), 'i' => $langs->trans('Minutes'));
@@ -187,7 +194,7 @@ $usercancreate = $user->hasRight('agenda', 'allactions', 'create') || ((empty($o
$listUserAssignedUpdated = false;
$listResourceAssignedUpdated = false;
$assignedtouser = array();
$assignedtouser = [];
// Remove user to assigned list
if (empty($reshook) && (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')) {
@@ -196,7 +203,7 @@ if (empty($reshook) && (GETPOST('removedassigned') || GETPOST('removedassigned')
if (!empty($_SESSION['assignedtouser'])) {
$tmpassigneduserids = json_decode($_SESSION['assignedtouser'], true);
} else {
$tmpassigneduserids = array();
$tmpassigneduserids = [];
}
foreach ($tmpassigneduserids as $key => $val) {
@@ -223,7 +230,7 @@ if (empty($reshook) && (GETPOST('removedassignedresource') || GETPOST('removedas
if (!empty($_SESSION['assignedtoresource'])) {
$tmpassignedresourceids = json_decode($_SESSION['assignedtoresource'], true);
} else {
$tmpassignedresourceids = array();
$tmpassignedresourceids = [];
}
foreach ($tmpassignedresourceids as $key => $val) {
@@ -248,7 +255,7 @@ if (empty($reshook) && (GETPOST('removedassignedresource') || GETPOST('removedas
if (empty($reshook) && (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))) {
// Add a new user
if (GETPOST('assignedtouser') > 0) {
$assignedtouser = array();
$assignedtouser = [];
if (!empty($_SESSION['assignedtouser'])) {
$assignedtouser = json_decode($_SESSION['assignedtouser'], true);
}
@@ -270,7 +277,7 @@ if (empty($reshook) && (GETPOST('addassignedtouser') || GETPOST('updateassignedt
if (empty($reshook) && (GETPOST('addassignedtoresource') || GETPOST('updateassignedtoresource'))) {
// Add a new user
if (GETPOST('assignedtoresource') > 0) {
$assignedtoresource = array();
$assignedtoresource = [];
if (!empty($_SESSION['assignedtoresource'])) {
$assignedtoresource = json_decode($_SESSION['assignedtoresource'], true);
}
@@ -380,7 +387,7 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
$object->type_code = GETPOST('actioncode', 'aZ09');
}
$listofresourceid = array();
$listofresourceid = [];
if (!$error) {
// Initialisation of object actioncomm
@@ -441,7 +448,7 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
$transparency = (GETPOST("transparency") == 'on' ? 1 : 0);
$listofuserid = array();
$listofuserid = [];
if (!empty($_SESSION['assignedtouser'])) {
$listofuserid = json_decode($_SESSION['assignedtouser'], true);
}
@@ -528,9 +535,9 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
$object->recurrule .= (GETPOST('recurrulefreq', 'alpha') == 'MONTHLY') ? "_BYMONTHDAY".((int) $dayinmonth) : "";
$object->recurrule .= (GETPOST('recurrulefreq', 'alpha') == 'WEEKLY') ? "_BYDAY".((int) $dayinweek) : "";
$reg1 = array();
$reg2 = array();
$reg3 = array();
$reg1 = [];
$reg2 = [];
$reg3 = [];
if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i', $object->recurrule, $reg1)) {
$selectedrecurrulefreq = $reg1[1];
}
@@ -931,7 +938,7 @@ if (empty($reshook) && $action == 'update' && $usercancreate) {
$object->location = GETPOST('location', "alphanohtml");
$object->socid = GETPOSTINT("socid");
$socpeopleassigned = GETPOST("socpeopleassigned", 'array');
$object->socpeopleassigned = array();
$object->socpeopleassigned = [];
foreach ($socpeopleassigned as $cid) {
$object->socpeopleassigned[$cid] = array('id' => $cid);
}
@@ -974,7 +981,7 @@ if (empty($reshook) && $action == 'update' && $usercancreate) {
$transparency = (GETPOST("transparency") == 'on' ? 1 : 0);
// Users
$listofuserid = array();
$listofuserid = [];
if (!empty($_SESSION['assignedtouser'])) { // Now concat assigned users
// Restore array with key with same value than param 'id'
$tmplist1 = json_decode($_SESSION['assignedtouser'], true);
@@ -989,7 +996,7 @@ if (empty($reshook) && $action == 'update' && $usercancreate) {
$listofuserid[$assignedtouser] = array('id' => $assignedtouser, 'mandatory' => 0, 'transparency' => ($user->id == $assignedtouser ? $transparency : '')); // Owner first
}
}
$object->userassigned = array();
$object->userassigned = [];
$object->userownerid = 0; // Clear old content
$i = 0;
foreach ($listofuserid as $key => $val) {
@@ -1103,7 +1110,7 @@ if (empty($reshook) && $action == 'update' && $usercancreate) {
$reminder->delete($user);
}
}
$object->reminders = array();
$object->reminders = [];
}
// Create reminders for every assigned user if reminder is on
@@ -1497,7 +1504,7 @@ if ($action == 'create') {
$object->recurrule .= GETPOSTISSET('BYDAY') ? "_BYDAY".GETPOST('BYDAY', 'alpha') : "";
$reg = array();
$reg = [];
if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i', $object->recurrule, $reg)) {
$selectedrecurrulefreq = $reg[1];
}
@@ -1574,9 +1581,9 @@ if ($action == 'create') {
// Assigned to user
print '<tr><td class="tdtop nowrap"><span class="fieldrequired">'.$langs->trans("ActionAffectedTo").'</span></td><td>';
$listofuserid = array();
$listofcontactid = array();
$listofotherid = array();
$listofuserid = [];
$listofcontactid = [];
$listofotherid = [];
if (empty($donotclearsession)) {
$assignedtouser = GETPOST("assignedtouser") ? GETPOST("assignedtouser") : (!empty($object->userownerid) && $object->userownerid > 0 ? $object->userownerid : $user->id);
@@ -1591,7 +1598,7 @@ if ($action == 'create') {
$listofuserid = json_decode($_SESSION['assignedtouser'], true);
}
if (!is_array($listofuserid)) {
$listofuserid = array();
$listofuserid = [];
}
$firstelem = reset($listofuserid);
if (isset($listofuserid[$firstelem['id']])) {
@@ -1599,7 +1606,7 @@ if ($action == 'create') {
}
}
print '<!-- list of user to assign --><div class="assignedtouser">';
print $form->select_dolusers_forevent(($action == 'create' ? 'add' : 'update'), 'assignedtouser', 1, array(), 0, '', array(), '0', 0, 0, 'u.statut:<>:0', 1, $listofuserid, $listofcontactid, $listofotherid);
print $form->select_dolusers_forevent(($action == 'create' ? 'add' : 'update'), 'assignedtouser', 1, [], 0, '', [], '0', 0, 0, 'u.statut:<>:0', 1, $listofuserid, $listofcontactid, $listofotherid);
print '</div>';
print '</td></tr>';
@@ -1619,7 +1626,7 @@ if ($action == 'create') {
// Resources
print '<tr><td class="tdtop nowrap">'.$langs->trans("Resource").'</td><td>';
$listofresourceid = array();
$listofresourceid = [];
if (empty($donotclearsession)) {
$assignedtoresource = GETPOST("assignedtoresource");
if ($assignedtoresource) {
@@ -1631,7 +1638,7 @@ if ($action == 'create') {
$listofresourceid = json_decode($_SESSION['assignedtoresource'], true);
}
if (!is_array($listofresourceid)) {
$listofresourceid = array();
$listofresourceid = [];
}
$firstelem = reset($listofresourceid);
if (isset($listofresourceid[$firstelem['id']])) {
@@ -1639,7 +1646,7 @@ if ($action == 'create') {
}
}
print '<div class="assignedtoresource">';
print $form->select_dolresources_forevent(($action == 'create' ? 'add' : 'update'), 'assignedtoresource', 1, array(), 0, '', array(), '0', 0, 0, 'AND u.statut != 0', 1, $listofresourceid);
print $form->select_dolresources_forevent(($action == 'create' ? 'add' : 'update'), 'assignedtoresource', 1, [], 0, '', [], '0', 0, 0, 'AND u.statut != 0', 1, $listofresourceid);
print '</div>';
print '</td></tr>';
}
@@ -1679,7 +1686,7 @@ if ($action == 'create') {
print $societe->getNomUrl(1);
print '<input type="hidden" id="socid" name="socid" value="'.GETPOSTINT('socid').'">';
} else {
$events = array();
$events = [];
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1&token='.currentToken(), 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
//For external user force the company to user company
if (!empty($user->socid)) {
@@ -1712,14 +1719,14 @@ if ($action == 'create') {
// FIXME Use a select without the "multiple" (not supported when CONTACT_USE_SEARCH_TO_SELECT is on) or allow use only when $object->socid is set...
/*
$selected = array_keys($object->socpeopleassigned);
print $form->select_contact(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : $object->socid, $selected, 'socpeopleassigned', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', false, 0, 0, array());
print $form->select_contact(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : $object->socid, $selected, 'socpeopleassigned', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', false, 0, 0, []);
*/
$sav = getDolGlobalString('CONTACT_USE_SEARCH_TO_SELECT');
$conf->global->CONTACT_USE_SEARCH_TO_SELECT = 0;
print $form->selectcontacts(GETPOSTISSET('socid') ? GETPOSTINT('socid') : $select_contact_default, $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 widthcentpercentminusxx maxwidth500', 0, 0, 0, array(), 'multiple', 'contactid');
print $form->selectcontacts(GETPOSTISSET('socid') ? GETPOSTINT('socid') : $select_contact_default, $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 widthcentpercentminusxx maxwidth500', 0, 0, 0, [], 'multiple', 'contactid');
$conf->global->CONTACT_USE_SEARCH_TO_SELECT = $sav;
} else {
print $form->selectcontacts(GETPOSTISSET('socid') ? GETPOSTINT('socid') : $select_contact_default, $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 widthcentpercentminusxx maxwidth500', 0, 0, 0, array(), 'multiple', 'contactid');
print $form->selectcontacts(GETPOSTISSET('socid') ? GETPOSTINT('socid') : $select_contact_default, $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 widthcentpercentminusxx maxwidth500', 0, 0, 0, [], 'multiple', 'contactid');
}
print '</td></tr>';
@@ -1822,7 +1829,7 @@ if ($action == 'create') {
print '</td></tr>';
// Other attributes
$parameters = array();
$parameters = [];
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
@@ -2176,7 +2183,7 @@ if ($id > 0 && $action != 'create') {
print '<tr><td class="">&nbsp;</td><td></td></tr>';
// Assigned to
$listofuserid = array(); // User assigned
$listofuserid = []; // User assigned
if (empty($donotclearsession)) {
if ($object->userownerid > 0) {
$listofuserid[$object->userownerid] = array(
@@ -2209,7 +2216,7 @@ if ($id > 0 && $action != 'create') {
print '<tr><td class="tdtop nowrap fieldrequired">'.$langs->trans("ActionAssignedTo").'</td><td>';
print '<div class="assignedtouser">';
print $form->select_dolusers_forevent(($action == 'create' ? 'add' : 'update'), 'assignedtouser', 1, array(), 0, '', array(), '0', 0, 0, 'u.statut:<>:0', 1, $listofuserid, $listofcontactid, $listofotherid, (int) $caneditdateorowner);
print $form->select_dolusers_forevent(($action == 'create' ? 'add' : 'update'), 'assignedtouser', 1, [], 0, '', [], '0', 0, 0, 'u.statut:<>:0', 1, $listofuserid, $listofcontactid, $listofotherid, (int) $caneditdateorowner);
print '</div>';
/*if (in_array($user->id,array_keys($listofuserid)))
{
@@ -2250,7 +2257,7 @@ if ($id > 0 && $action != 'create') {
print '<tr><td class="titlefieldcreate">'.$langs->trans("ActionOnCompany").'</td>';
print '<td>';
print '<div>';
$events = array(); // 'method'=parameter action of url, 'url'=url to call that return new list of contacts
$events = []; // 'method'=parameter action of url, 'url'=url to call that return new list of contacts
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1&token='.currentToken(), 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
// TODO Refresh also list of project if conf PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY not defined with list linked to socid ?
// FIXME If we change company, we may get a project that does not match
@@ -2267,15 +2274,15 @@ if ($id > 0 && $action != 'create') {
// FIXME Use the select_contact supporting the "multiple"
/*
$selected = array_keys($object->socpeopleassigned);
print $form->select_contact(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : $object->socid, $selected, 'socpeopleassigned', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', false, 0, 0, array());
print $form->select_contact(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : $object->socid, $selected, 'socpeopleassigned', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', false, 0, 0, []);
*/
$sav = getDolGlobalString('CONTACT_USE_SEARCH_TO_SELECT');
$conf->global->CONTACT_USE_SEARCH_TO_SELECT = 0;
print $form->selectcontacts(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : ($object->socid > 0 ? $object->socid : -1), array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', 0, 0, 0, array(), 'multiple', 'contactid');
print $form->selectcontacts(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : ($object->socid > 0 ? $object->socid : -1), array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', 0, 0, 0, [], 'multiple', 'contactid');
$conf->global->CONTACT_USE_SEARCH_TO_SELECT = $sav;
} else {
// Warning: MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT will hangs on large databases
print $form->selectcontacts(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : $object->socid, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', 0, 0, 0, array(), 'multiple', 'contactid');
print $form->selectcontacts(getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : $object->socid, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', 0, 0, 0, [], 'multiple', 'contactid');
}
print '</div>';
print '</td>';
@@ -2382,7 +2389,7 @@ if ($id > 0 && $action != 'create') {
print '</td></tr>';
// Other attributes
$parameters = array();
$parameters = [];
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
@@ -2525,11 +2532,11 @@ if ($id > 0 && $action != 'create') {
// Clone event
if ($action == 'clone') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', array(), 'yes', 1);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', [], 'yes', 1);
}
// Call Hook formConfirm
$parameters = array();
$parameters = [];
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
$formconfirm .= $hookmanager->resPrint;
@@ -2572,7 +2579,7 @@ if ($id > 0 && $action != 'create') {
$linkback .= '</a>';
// Add more views from hooks
$parameters = array();
$parameters = [];
$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
if (empty($reshook)) {
$linkback .= $hookmanager->resPrint;
@@ -2675,7 +2682,7 @@ if ($id > 0 && $action != 'create') {
if ($object->recurid) {
print '<tr><td class="titlefieldmiddle">'.$langs->trans("RecurringEvent").'</td><td>';
print img_picto($langs->trans("EventPartOfARecurringSerie", $object->recurid), 'recurring', 'class="pictofixedwidth"');
$reg = array();
$reg = [];
if (preg_match('/FREQ=MONTHLY_BYMONTHDAY(\d+)/', $object->recurrule, $reg)) {
print $langs->trans("EveryMonth").' <span class="opacitymedium small">('.$langs->trans("DayOfMonth").' '.$reg[1].' - '.$langs->trans("Until").' '.dol_print_date($object->recurdateend, 'day').')</span>';
}
@@ -2689,7 +2696,7 @@ if ($id > 0 && $action != 'create') {
// Assigned to user
print '<tr><td class="nowrap">'.$langs->trans("ActionAssignedTo").'</td><td>';
$listofuserid = array();
$listofuserid = [];
if (empty($donotclearsession)) {
if ($object->userownerid > 0) {
$listofuserid[$object->userownerid] = array(
@@ -2715,10 +2722,10 @@ if ($id > 0 && $action != 'create') {
}
}
$listofcontactid = array(); // not used yet
$listofotherid = array(); // not used yet
$listofcontactid = []; // not used yet
$listofotherid = []; // not used yet
print '<div class="assignedtouser">';
print $form->select_dolusers_forevent('view', 'assignedtouser', 1, array(), 0, '', array(), '0', 0, 0, '', ($object->datep != $object->datef) ? 1 : 0, $listofuserid, $listofcontactid, $listofotherid);
print $form->select_dolusers_forevent('view', 'assignedtouser', 1, [], 0, '', [], '0', 0, 0, '', ($object->datep != $object->datef) ? 1 : 0, $listofuserid, $listofcontactid, $listofotherid);
print '</div>';
/*
if ($object->datep != $object->datef && in_array($user->id,array_keys($listofuserid)))
@@ -2886,7 +2893,7 @@ if ($id > 0 && $action != 'create') {
*/
print '<div class="tabsAction">';
$parameters = array();
$parameters = [];
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
if ($action != 'edit') {
@@ -2931,7 +2938,7 @@ if ($id > 0 && $action != 'create') {
if (getDolGlobalString('AGENDA_ENABLE_LINKED_ELEMENTS')) {
// Show links to link elements
$tmparray = $form->showLinkToObjectBlock($object, array(), array('myobject'), 1);
$tmparray = $form->showLinkToObjectBlock($object, [], array('myobject'), 1);
if (is_array($tmparray)) {
$linktoelem = $tmparray['linktoelem'];
$htmltoenteralink = $tmparray['htmltoenteralink'];

View File

@@ -1917,6 +1917,8 @@ AGENDA_REMINDER_BROWSERHelp = When remind date is reached, a popup is shown by t
AGENDA_REMINDER_BROWSER_SOUND = Enable sound notification
AGENDA_REMINDER_EMAIL = Allow event reminders <b>by emails</b>
AGENDA_REMINDER_EMAIL_NOTE = Note: The frequency of the scheduled job %s must be enough to be sure that the remind are sent at the correct moment.
AGENDA_REMINDER_SMS = Allow event reminders <b>by sms</b>
AGENDA_REMINDER_SMSHelp = When remind date is reached, a sms is sent. Remind option/delay is defined by the user on event creation.
AGENDA_SHOW_LINKED_OBJECT = Show linked object into agenda view
AGENDA_USE_EVENT_TYPE = Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events)
AGENDA_USE_EVENT_TYPE_DEFAULT = Automatically set this default value for type of event in event create form