Line 177... |
Line 177... |
177 |
$retour[$projet]['champs-supp'][$key]['name'] = $this->clean_string( $chsup['name'] );
|
177 |
$retour[$projet]['champs-supp'][$key]['name'] = $this->clean_string( $chsup['name'] );
|
178 |
$retour[$projet]['champs-supp'][$key]['description'] = $this->clean_string( $chsup['description']);
|
178 |
$retour[$projet]['champs-supp'][$key]['description'] = $this->clean_string( $chsup['description']);
|
179 |
$retour[$projet]['champs-supp'][$key]['unit'] = $this->clean_string( $chsup['unit'] );
|
179 |
$retour[$projet]['champs-supp'][$key]['unit'] = $this->clean_string( $chsup['unit'] );
|
Line 180... |
Line 180... |
180 |
|
180 |
|
181 |
if ( isset( $chsup['fieldValues'] ) ) {
|
181 |
if ( isset( $chsup['fieldValues'] ) ) {
|
182 |
$retour[$projet]['champs-supp'][$key]['fieldValues'] = json_decode( $chsup['fieldValues'], true );
|
- |
|
183 |
if ( isset($retour[$projet]['champs-supp'][$key]['fieldValues']['placeholder'] ) ) {
|
- |
|
184 |
$retour[$projet]['champs-supp'][$key]['fieldValues']['placeholder'] = $this->clean_string( $retour[$projet]['champs-supp'][$key]['fieldValues']['placeholder'] );
|
- |
|
Line 185... |
Line 182... |
185 |
}
|
182 |
$retour[$projet]['champs-supp'][$key]['fieldValues'] = json_decode( $this->clean_string( $chsup['fieldValues'] ), true );
|
186 |
|
183 |
|
187 |
if ( isset( $retour[$projet]['champs-supp'][$key]['fieldValues']['listValue'] ) ) {
|
- |
|
188 |
foreach( $retour[$projet]['champs-supp'][$key]['fieldValues']['listValue'] as $list_key => $list_value_array ) {
|
184 |
if ( isset( $retour[$projet]['champs-supp'][$key]['fieldValues']['listValue'] ) ) {
|
189 |
$retour[$projet]['champs-supp'][$key]['fieldValues']['listValue'][$list_key][0] = $this->clean_string( $list_value_array[0] );
|
185 |
foreach( $retour[$projet]['champs-supp'][$key]['fieldValues']['listValue'] as $list_key => $list_value_array ) {
|
190 |
// Obtenir une liste de valeurs utilisables dans les attributs for id ou name par exemple
|
- |
|
191 |
$retour[$projet]['champs-supp'][$key]['fieldValues']['cleanListValue'][] = 'val-' . preg_replace( '/[^A-Za-z0-9_\-]/', '', $this->remove_accents( $list_value_array[0] ) );
|
186 |
// Obtenir une liste de valeurs utilisables dans les attributs for id ou name par exemple
|
192 |
$retour[$projet]['champs-supp'][$key]['fieldValues']['listValue'][$list_key][1] = $this->clean_string( $list_value_array[1] );
|
187 |
$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] ) ) ) : '';
|
193 |
}
|
188 |
}
|
194 |
}
|
189 |
}
|
195 |
}
|
190 |
}
|