86 if (empty($elementtype)) {
90 if ($elementtype ==
'thirdparty') {
91 $elementtype =
'societe';
93 if ($elementtype ==
'contact') {
94 $elementtype =
'socpeople';
96 if ($elementtype ==
'order_supplier') {
97 $elementtype =
'commande_fournisseur';
101 $array_name_label = array();
102 if (!empty($conf->global->MAIN_USE_ALTERNATE_TRANSLATION_FOR)) {
103 $tmpelement = explode(
';', $conf->global->MAIN_USE_ALTERNATE_TRANSLATION_FOR);
104 foreach ($tmpelement as $elementstring) {
106 preg_match(
'/^(.*):(.*)$/', $elementstring, $reg);
108 $array_name_label[$element] = array();
109 $tmpfields = explode(
',', $reg[2]);
110 foreach ($tmpfields as $field) {
114 $array_name_label[$element][$field] = $field;
119 $this->attributes = $array_name_label;
121 return $array_name_label;
140 public function showInputField($key, $value, $extrafieldsobjectkey, $moreparam =
'', $keysuffix =
'', $keyprefix =
'', $morecss =
'', $objectid = 0, $mode = 0)
142 global $conf, $langs, $form;
144 if (!is_object($form)) {
145 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
146 $form =
new Form($this->db);
151 if (!preg_match(
'/options_$/', $keyprefix)) {
152 $keyprefix = $keyprefix.
'options_';