New all project contact in task creation (#35862)

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Lucas Marcouiller
2025-10-21 02:13:10 +02:00
committed by GitHub
parent cdd4dde166
commit ad67faa01d
3 changed files with 31 additions and 4 deletions

View File

@@ -2211,7 +2211,7 @@ class Form
global $action;
// If no preselected user defined, we take current user
if ((is_numeric($selected) && ($selected < -3 || empty($selected))) && !getDolGlobalString('SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE')) {
if ((is_numeric($selected) && ($selected < -4 || empty($selected))) && !getDolGlobalString('SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE')) {
$selected = $user->id;
}
@@ -2388,6 +2388,18 @@ class Form
'picto' => ''
);
}
if ($showalso == 4) {
$out .= '<option value="-4"' . ((in_array(-4, $selected)) ? ' selected' : '') . '>-- ' . $langs->trans("AllProjectContacts") . ' --</option>' . "\n";
$outarray[-4] = '-- ' . $langs->trans("AllProjectContacts") . ' --';
$outarray2[-4] = array(
'id' => -4,
'label' => '-- ' . $langs->trans("AllProjectContacts") . ' --',
'labelhtml' => '-- ' . $langs->trans("AllProjectContacts") . ' --',
'color' => '',
'picto' => ''
);
}
$userstatic = new User($this->db);