Fix: default setup of type of action

This commit is contained in:
Laurent Destailleur 2014-09-15 19:27:45 +02:00
parent c97692a664
commit 8487913209
2 changed files with 2 additions and 1 deletions

View File

@ -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);

View File

@ -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 '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';