FIX: contact/adress tab: when changing company ajax combo, the first contact change is not taken into account
This commit is contained in:
parent
051853fc00
commit
7e2eca661b
@ -1355,7 +1355,7 @@ class Form
|
||||
$out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
|
||||
}
|
||||
|
||||
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.'" '.(!empty($moreparam) ? $moreparam : '').'>';
|
||||
if ($htmlname != 'none' && ! $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.'" '.(!empty($moreparam) ? $moreparam : '').'>';
|
||||
if ($showempty == 1) $out.= '<option value="0"'.($selected=='0'?' selected':'').'> </option>';
|
||||
if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans("Internal").'</option>';
|
||||
$num = $this->db->num_rows($resql);
|
||||
@ -1417,7 +1417,7 @@ class Form
|
||||
{
|
||||
$out.= '<option value="-1"'.($showempty==2?'':' selected').' disabled>'.$langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined").'</option>';
|
||||
}
|
||||
if ($htmlname != 'none' || $options_only)
|
||||
if ($htmlname != 'none' && ! $options_only)
|
||||
{
|
||||
$out.= '</select>';
|
||||
}
|
||||
|
||||
@ -589,8 +589,8 @@ class FormCompany
|
||||
runJsCodeForEvent'.$htmlname.'(values);
|
||||
}
|
||||
});
|
||||
/* Clean contact */
|
||||
$("div#s2id_contactid>a>span").html(\'\');
|
||||
|
||||
$(this).trigger("blur");
|
||||
});
|
||||
|
||||
// Function used to execute events when search_htmlname change
|
||||
|
||||
Loading…
Reference in New Issue
Block a user