Merge pull request #7433 from tysauron/patch-11
For use ajax combobox for societe and contacts in action card create.
This commit is contained in:
commit
36b199e78c
@ -771,9 +771,9 @@ if ($action == 'create')
|
||||
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
|
||||
//For external user force the company to user company
|
||||
if (!empty($user->societe_id)) {
|
||||
print $form->select_thirdparty_list($user->societe_id, 'socid', '', 1, 1, 0, $events);
|
||||
print $form->select_company($user->societe_id, 'socid', '', 1, 1, 0, $events);
|
||||
} else {
|
||||
print $form->select_thirdparty_list('', 'socid', '', 'SelectThirdParty', 1, 0, $events);
|
||||
print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, $events);
|
||||
}
|
||||
|
||||
}
|
||||
@ -781,7 +781,7 @@ if ($action == 'create')
|
||||
|
||||
// Related contact
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionOnContact").'</td><td>';
|
||||
$form->select_contacts(GETPOST('socid','int'), GETPOST('contactid'), 'contactid', 1, '', '', 0, 'minwidth200');
|
||||
$form->selectcontacts(GETPOST('socid','int'), GETPOST('contactid'), 'contactid', 1, '', '', 0, 'minwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user