| Line 164... |
Line 164... |
| 164 |
$url = $this->cel_url_tpl . '?projet=' . $this->parametres['projet'] . '&langue=' . $this->parametres['langue'];
|
164 |
$url = $this->cel_url_tpl . '?projet=' . $this->parametres['projet'] . '&langue=' . $this->parametres['langue'];
|
| 165 |
$json = $this->getDao()->consulter( $url );
|
165 |
$json = $this->getDao()->consulter( $url );
|
| 166 |
$tableau = (array) json_decode( $json, true );
|
166 |
$tableau = (array) json_decode( $json, true );
|
| 167 |
$retour['squelette'] = 'creation';
|
167 |
$retour['squelette'] = 'creation';
|
| 168 |
$retour['donnees']['widget'] = $tableau[0];
|
168 |
$retour['donnees']['widget'] = $tableau[0];
|
| - |
|
169 |
// obtenir un tableau de coordonnées+zoom expoitable
|
| - |
|
170 |
if (isset($retour['donnees']['widget']['localisation'])) {
|
| - |
|
171 |
$retour['donnees']['widget']['tableau-localisation'] = $this->traiterLocalisation($retour['donnees']['widget']['localisation']);
|
| - |
|
172 |
}
|
| 169 |
// En prévision d'un service permettant la suppression/modification champs supp
|
173 |
// En prévision d'un service permettant la suppression/modification champs supp
|
| 170 |
$retour['donnees']['widget']['chpSupp'] = $this->rechercherChampsSupp();
|
174 |
$retour['donnees']['widget']['chpSupp'] = $this->rechercherChampsSupp();
|
| Line 171... |
Line 175... |
| 171 |
|
175 |
|
| 172 |
$urltype = $this->cel_url_tpl .'?esttype=1';
|
176 |
$urltype = $this->cel_url_tpl .'?esttype=1';
|
| Line 205... |
Line 209... |
| 205 |
}
|
209 |
}
|
| 206 |
}
|
210 |
}
|
| 207 |
return $parametres_modif;
|
211 |
return $parametres_modif;
|
| 208 |
}
|
212 |
}
|
| Line -... |
Line 213... |
| - |
|
213 |
|
| - |
|
214 |
private function traiterLocalisation( $infos_localisation ) {
|
| - |
|
215 |
$infos = explode(';', $infos_localisation);
|
| - |
|
216 |
$tableauTmp = array();
|
| - |
|
217 |
$retour = array();
|
| - |
|
218 |
foreach ($infos as $info) {
|
| - |
|
219 |
$tableauTmp = explode(':', $info);
|
| - |
|
220 |
$retour[$tableauTmp[0]] = $tableauTmp[1];
|
| - |
|
221 |
}
|
| - |
|
222 |
return $retour;
|
| - |
|
223 |
}
|
| 209 |
|
224 |
|
| 210 |
private function traiterDonneesFiles() {
|
225 |
private function traiterDonneesFiles() {
|
| 211 |
$return = array();
|
226 |
$return = array();
|
| 212 |
$transmettre_donnees = false;
|
227 |
$transmettre_donnees = false;
|
| 213 |
$files_names = array();
|
228 |
$files_names = array();
|
| Line 396... |
Line 411... |
| 396 |
$retour[$projet]['champs-supp'][$key]['fieldValues']['cleanListValue'][] = ($list_value_array !== 'other') ? 'val-' . preg_replace( '/[^A-Za-z0-9_\-]/', '', $this->remove_accents( strtolower($list_value_array[0] ) ) ) : '';
|
411 |
$retour[$projet]['champs-supp'][$key]['fieldValues']['cleanListValue'][] = ($list_value_array !== 'other') ? 'val-' . preg_replace( '/[^A-Za-z0-9_\-]/', '', $this->remove_accents( strtolower($list_value_array[0] ) ) ) : '';
|
| 397 |
}
|
412 |
}
|
| 398 |
}
|
413 |
}
|
| 399 |
}
|
414 |
}
|
| 400 |
$retour[$projet]['champs-supp'][$key]['mandatory'] = intval( $chsup['mandatory'] );
|
415 |
$retour[$projet]['champs-supp'][$key]['mandatory'] = intval( $chsup['mandatory'] );
|
| - |
|
416 |
$retour[$projet]['champs-supp'][$key]['is_visible'] = intval( $chsup['is_visible'] );
|
| 401 |
}
|
417 |
}
|
| - |
|
418 |
// renvoyer un json exploitable par le sccript js
|
| - |
|
419 |
$retour[$projet]['champs-supp-json'] = json_encode($retour[$projet]['champs-supp']);
|
| 402 |
return $retour;
|
420 |
return $retour;
|
| 403 |
}
|
421 |
}
|
| 404 |
}
|
422 |
}
|