diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index cd57f61d9a7..696a70867cf 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -265,7 +265,6 @@ class FormActions if ($selected == 'manual') $selected='AC_OTH'; if ($selected == 'auto') $selected='AC_OTH_AUTO'; - if (empty($selected) && ! empty($conf->global->AGENDA_DEFAULT_TYPE)) $selected=$conf->global->AGENDA_DEFAULT_TYPE; print $form->selectarray($htmlname, $arraylist, $selected); if ($user->admin && empty($onlyautoornot) && empty($hideinfohelp)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 27b02e060e8..29446524a81 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -50,6 +50,8 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh global $conf, $user, $langs, $db, $hookmanager; global $begin_h, $end_h, $begin_d, $end_d; + if ($actioncode == '' && ! empty($conf->global->AGENDA_DEFAULT_TYPE)) $actioncode=$conf->global->AGENDA_DEFAULT_TYPE; + // Filters print '
'; print '';