Fix: Bad parameters
This commit is contained in:
parent
8374bf42bb
commit
d2c92b91de
@ -279,12 +279,12 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<td colspan="1">';
|
||||
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$propal->client->id;
|
||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($propal, 'propalid', $selectedCompany, $htmlname = 'newcompany');
|
||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($propal, 'propalid', $selectedCompany, 'newcompany');
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="1">';
|
||||
//$contactAlreadySelected = $propal->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected);
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
|
||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
|
||||
@ -281,7 +281,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<td colspan="1">';
|
||||
// $contactAlreadySelected = $commande->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected);
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
|
||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
|
||||
@ -279,7 +279,7 @@ if ($id > 0)
|
||||
|
||||
print '<td colspan="1">';
|
||||
//$contactAlreadySelected = $contrat->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected);
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
|
||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
|
||||
@ -266,7 +266,7 @@ if ($id > 0)
|
||||
|
||||
print '<td colspan="1">';
|
||||
//$contactAlreadySelected = $fichinter->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected);
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
|
||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
|
||||
@ -273,7 +273,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<td colspan="1">';
|
||||
// $contactAlreadySelected = $commande->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected);
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
|
||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
|
||||
@ -267,15 +267,15 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
print '<input type="hidden" name="source" value="external">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
|
||||
// Line to add external contact. Only if project is linked to a third party.
|
||||
if ($project->societe->id)
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
print '<input type="hidden" name="source" value="external">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
@ -289,7 +289,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="1">';
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany,'','contactid',0);
|
||||
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0);
|
||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
@ -299,9 +299,9 @@ if ($id > 0 || ! empty($ref))
|
||||
if (! $nbofcontacts) print ' disabled="true"';
|
||||
print '></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print "</form>";
|
||||
print "</form>";
|
||||
}
|
||||
|
||||
print '<tr><td colspan="6"> </td></tr>';
|
||||
}
|
||||
|
||||
@ -268,15 +268,15 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
print '<input type="hidden" name="source" value="external">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
|
||||
// Line to add an external contact. Only if project linked to a third party.
|
||||
if ($project->socid)
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
print '<input type="hidden" name="source" value="external">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
@ -302,9 +302,9 @@ if ($id > 0 || ! empty($ref))
|
||||
if (! $nbofcontacts) print ' disabled="true"';
|
||||
print '></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print "</form>";
|
||||
print "</form>";
|
||||
}
|
||||
|
||||
print '<tr><td colspan="6"> </td></tr>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user