diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php
index c0d9d389627..5af5b8a5787 100644
--- a/htdocs/admin/agenda.php
+++ b/htdocs/admin/agenda.php
@@ -94,6 +94,34 @@ if ($action == "save" && empty($cancel))
}
}
+if (preg_match('/set_(.*)/',$action,$reg))
+{
+ $code=$reg[1];
+ $value=(GETPOST($code) ? GETPOST($code) : 1);
+ if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0)
+ {
+ Header("Location: ".$_SERVER["PHP_SELF"]);
+ exit;
+ }
+ else
+ {
+ dol_print_error($db);
+ }
+}
+
+if (preg_match('/del_(.*)/',$action,$reg))
+{
+ $code=$reg[1];
+ if (dolibarr_del_const($db, $code, $conf->entity) > 0)
+ {
+ Header("Location: ".$_SERVER["PHP_SELF"]);
+ exit;
+ }
+ else
+ {
+ dol_print_error($db);
+ }
+}
/**
@@ -159,6 +187,46 @@ print "\n";
print '';
+/*
+ * Other options
+*/
+
+print_titre($langs->trans("OtherOptions"));
+
+$var=true;
+
+print '
'."\n";
+print ''."\n";
+print '| '.$langs->trans("Parameters").' | '."\n";
+print ' | '."\n";
+print ''.$langs->trans("Value").' | '."\n";
+print '
'."\n";
+
+// Manual or automatic
+$var=!$var;
+print ''."\n";
+print '| '.$langs->trans("AGENDA_USE_EVENT_TYPE").' | '."\n";
+print ' | '."\n";
+
+print ''."\n";
+if ($conf->use_javascript_ajax)
+{
+ print ajax_constantonoff('AGENDA_USE_EVENT_TYPE');
+}
+else
+{
+ if($conf->global->AGENDA_USE_EVENT_TYPE == 0)
+ {
+ print ''.img_picto($langs->trans("Disabled"),'off').'';
+ }
+ else if($conf->global->BUSINESS_VISIBLE_TO_ALL_BY_DEFAULT == 1)
+ {
+ print ''.img_picto($langs->trans("Enabled"),'on').'';
+ }
+}
+print ' |
'."\n";
+
+
print "
";
dol_htmloutput_mesg($mesg);
diff --git a/htdocs/install/mysql/data/llx_c_actioncomm.sql b/htdocs/install/mysql/data/llx_c_actioncomm.sql
index 55bba83dca4..3cceb0dc077 100644
--- a/htdocs/install/mysql/data/llx_c_actioncomm.sql
+++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql
@@ -31,15 +31,15 @@
--
delete from llx_c_actioncomm where id in (1,2,3,4,5,8,9,10,30,31,40,50);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 1, 'AC_TEL', 'system', 'Phone call' ,NULL, 1, 2);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2, 'AC_FAX', 'system', 'Send Fax' ,NULL, 1, 3);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 3, 'AC_PROP', 'systemauto', 'Send commercial proposal by email' ,'propal',0, 10);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 4, 'AC_EMAIL', 'system', 'Send Email' ,NULL, 1, 4);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 5, 'AC_RDV', 'system', 'Rendez-vous' ,NULL, ,1 1);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 8, 'AC_COM', 'systemauto', 'Send customer order by email' ,'order', 0, 8);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 9, 'AC_FAC', 'systemauto', 'Send customer invoice by email' ,'invoice',0, 6);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 10, 'AC_SHIP', 'systemauto', 'Send shipping by email' ,'shipping',0, 11);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 30, 'AC_SUP_ORD', 'systemauto', 'Send supplier order by email' ,'order_supplier',0, 9);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 31, 'AC_SUP_INV', 'systemauto', 'Send supplier invoice by email' ,'invoice_supplier',0, 7);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 40, 'AC_OTH_AUTO','systemauto', 'Other (automatically inserted events)' ,NULL, 1, 20);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 50, 'AC_OTH', 'system', 'Other (manually inserted events)' ,NULL, 1, 5);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 1,'AC_TEL','system','Phone call',NULL, 1, 2);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2,'AC_FAX','system','Send Fax',NULL, 1, 3);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 3,'AC_PROP','systemauto', 'Send commercial proposal by email','propal',0,10);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 4,'AC_EMAIL','system','Send Email',NULL, 1, 4);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 5,'AC_RDV','system','Rendez-vous',NULL, 1, 1);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 8,'AC_COM','systemauto','Send customer order by email','order', 0,8);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 9,'AC_FAC','systemauto', 'Send customer invoice by email','invoice',0,6);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 10,'AC_SHIP','systemauto', 'Send shipping by email','shipping',0,11);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 30,'AC_SUP_ORD','systemauto','Send supplier order by email','order_supplier',0,9);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 31,'AC_SUP_INV','systemauto','Send supplier invoice by email','invoice_supplier',0,7);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 40,'AC_OTH_AUTO','systemauto','Other (automatically inserted events)',NULL, 1, 20);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 50,'AC_OTH','system','Other (manually inserted events)',NULL, 1, 5);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 49bf96a66ae..6eb9b59b168 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1323,6 +1323,7 @@ AccountancyCodeBuy=Purchase account. code
AgendaSetup=Events and agenda module setup
PasswordTogetVCalExport=Key to authorize export link
PastDelayVCalExport=Do not export event older than
+AGENDA_USE_EVENT_TYPE=Use events types (manage into Configuration->Dictionnary->llx_c_actioncomm)
##### ClickToDial #####
ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example.
##### Point Of Sales (CashDesk) #####
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 50ae9edc377..089ae7f5cda 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -1330,6 +1330,7 @@ AccountancyCodeBuy=Code compta achat
AgendaSetup= Configuration du module actions et agenda
PasswordTogetVCalExport= Clé pour autoriser lien export
PastDelayVCalExport=Ne pas exporter les événements de plus de
+AGENDA_USE_EVENT_TYPE=Utilisez les type des évenements (administrable dans Configuration->Dictionnary->llx_c_actioncomm)
##### ClickToDial #####
ClickToDialDesc= Ce module permet d'ajouter un petit picto à côté des numéros de téléphones. Un clic sur ce picto provoque l'appel de l'URL définie dans ce paramétrage. Ceci permet de provoquer des appels à un serveur de téléphonie depuis Dolibarr qui peut alors composer le numéro sur un système SIP par exemple.
##### Point Of Sales (CashDesk) #####