62,7 → 62,8 |
"key" => "field_id", |
"element" => "data_type", |
"mandatory" => "is_mandatory", |
"unit" => "unit" |
"unit" => "unit", |
"is_visible" => "is_visible" |
); |
|
private $correspondance_champs_etendus_trad = array( |
114,6 → 115,12 |
public function updateElement($uid,$params) { |
$retour = ""; |
if (isset($params['projet']) && isset($params['langue'])) { |
if (isset($params['champs-supp'])) { |
$gestionchamps = new GestionChampsEtendus2($this->config); |
$champs = $this->traiterCorrespondanceChampsEtendusInterfaceBD($params); //var_dump($champs);exit; |
$liste = $gestionchamps->modifierParProjet($champs, $params['langue']); |
unset($params['champs-supp']); |
} |
$manager = new GestionWidget($this->config); |
$params['est_type'] = (isset($params['est_type']) && $params['est_type']== "on") ? 1 : 0; |
$requeteDonnees = $this->traiterCorresponceConfigWidgetInterfaceBD($params); |
175,7 → 182,7 |
$parametres_traites = array(); |
$corresp = $this->correspondance_config_widget; |
foreach($parametres as $cle => $valeur) { |
if(is_string($valeur) && !trim($valeur)) $valeur=NULL; |
if(is_string($valeur) && !trim($valeur) && $valeur !== '0') $valeur=NULL; |
if(isset($corresp[$cle])) { |
$parametres_traites[$corresp[$cle]] = $valeur; |
} |
195,7 → 202,7 |
if (isset($champ[$ci]) && $champ[$ci] != "") { |
$champsrequete['ce'][$i][$ce] = $champ[$ci]; |
} else { |
if ($ci == "mandatory") { |
if ($ci == "mandatory" || $ci == "is_visible") { |
$champsrequete['ce'][$i][$ce] = "0"; |
} else { |
$champsrequete['ce'][$i][$ce] = ""; |
202,7 → 209,7 |
} |
} |
} |
$champsrequete['ce'][$i]["is_visible"] = "1"; |
//$champsrequete['ce'][$i]["is_visible"] = "1"; |
// pour la table extended fiels trad champs interface => champs bd |
foreach ($this->correspondance_champs_etendus_trad as $cit => $cr) { |
if (isset($champ[$cit]) && is_array($champ[$cit])) { |
244,4 → 251,4 |
|
|
} |
?> |
?> |