diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 440a5d11833..e8a355dd1e3 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -651,7 +651,7 @@ if ($action == 'create') { print ''.$langs->trans("Type").''; $default=(empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)?'':$conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT); - $formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):($object->type_code?$object->type_code:$default), "actioncode","systemauto"); + $formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):($object->type_code?$object->type_code:$default), "actioncode", "systemauto", 0, -1); print ''; } diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 88f2f87c1e3..0316fb461cf 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -243,10 +243,10 @@ class FormActions * Output html select list of type of event * * @param string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx') - * @param string $htmlname Nom champ formulaire + * @param string $htmlname Name of select field * @param string $excludetype A type to exclude ('systemauto', 'system', '') * @param string $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type - * @param int $hideinfohelp 1=Do not show info help + * @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value * @param int $multiselect 1=Allow multiselect of action type * @return void */ @@ -280,7 +280,10 @@ class FormActions print $form->selectarray($htmlname, $arraylist, $selected); } - if ($user->admin && empty($onlyautoornot) && empty($hideinfohelp)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); + if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) + { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup").($hideinfohelp == -1 ? ". ".$langs->trans("YouCanSetDefaultValueInModuleSetup") : ''),1); + } } } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 435dfe5f78b..eebec1e7f88 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -610,6 +610,7 @@ TotalMan=Total NeverReceived=Never received Canceled=Canceled YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu setup - dictionary +YouCanSetDefaultValueInModuleSetup=You can set the default value used when creating a new record into module setup Color=Color Documents=Linked files DocumentsNb=Linked files (%s)