diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index e1d1e177d39..f3db30adcc7 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -308,7 +308,6 @@ class CActionComm } if ($typecalendar == 'module') { - //TODO check if possible to push it between system and systemauto $module = preg_replace('/^[^@]+@/', '', $obj->module); $label = '   '.$label; if (!isset($rep_code['AC_ALL_'.strtoupper($module)])) { // If first time for this module diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 48e68f83b9d..f39939fbf85 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -377,7 +377,7 @@ class FormActions public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = 'minwidth300') { // phpcs:enable - global $langs, $user, $form, $conf; + global $langs, $user, $form; if (!is_object($form)) { $form = new Form($this->db); @@ -408,13 +408,23 @@ class FormActions $out = ''; + // Reformat the array + $newarraylist = array(); + foreach ($arraylist as $key => $value) { + $disabled = ''; + if (strpos($key, 'AC_ALL_') !== false && strpos($key, 'AC_ALL_AUTO') === false) { + $disabled = 'disabled'; + } + $newarraylist[$key] = array('id' => $key, 'label' => $value, 'disabled' => $disabled); + } + if (!empty($multiselect)) { if (!is_array($selected) && !empty($selected)) { $selected = explode(',', $selected); } - $out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0); + $out .= $form->multiselectarray($htmlname, $newarraylist, $selected, 0, 0, 'centpercent', 0, 0); } else { - $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', $morecss, 1); + $out .= $form->selectarray($htmlname, $newarraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', $morecss, 1); } if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) { diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 3d17bd790f8..81acf920dbf 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -260,7 +260,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it public $export_enabled; public $export_permission; public $export_fields_array; - public $export_TypeFields_array; // Array of key=>type where type can be 'Numeric', 'Date', 'Text', 'Boolean', 'Status', 'List:xxx:login:rowid' + public $export_TypeFields_array; // Array of key=>type where type can be 'Numeric', 'Date', 'Text', 'Boolean', 'Status', 'List:xxx:fieldlabel:rowid' public $export_entities_array; public $export_aggregate_array; public $export_examplevalues_array;