Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2023-12-14 10:58:46 +01:00
commit a5977e75ce

View File

@ -127,7 +127,7 @@ if ($action == 'addcontact') {
$formquestion[] = array('type'=> 'other', 'name'=>'tasksavailable', 'label'=>'', 'value' => '<input type="hidden" id="tasksavailable" name="tasksavailable" value="'.implode(',', array_keys($task_to_affect)).'">');
}
$formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'] . $url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590);
$formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'] . $url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', ((count($formquestion) > 10) ? 0 : 1), 300, 590);
$formconfirmtoaddtasks .='
<script>
$(document).ready(function() {
@ -151,6 +151,11 @@ if ($action == 'addcontact') {
// Add new contact
if ($action == 'addcontact_confirm' && $user->rights->projet->creer) {
if (GETPOST('confirm', 'alpha') == 'no') {
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));