92,6 → 92,7 |
$retour['donnees']['bar'] = $this->bar; |
$retour['donnees']['url_base'] = sprintf($this->config['chemins']['baseURLAbsoluDyn'], ''); |
$retour['donnees']['url_ws_annuaire'] = sprintf($this->config['chemins']['baseURLServicesAnnuaireTpl'], 'utilisateur/identite-par-courriel/'); |
$retour['donnees']['authTpl'] = $this->config['manager']['authTpl'].'?projet='.$this->parametres['projet'].'&langue='.$this->parametres['langue']; |
$retour['donnees']['mode'] = $mode; |
$squelette = dirname(__FILE__).self::DS.'squelettes'.self::DS.$retour['squelette'].'.tpl.html'; |
$contenu = $this->traiterSquelettePhp($squelette, $retour['donnees']); |
142,39 → 143,9 |
/* Recherche si un projet a des champs de saisie supplémentaire */ |
private function rechercherChampsSupp() { |
$retour = array(); |
$url = $this->config['manager']['celChpSupTpl'].'groupes?groupe='.$this->parametres['projet'].'&langue='.$this->parametres['langue']; |
$json = $this->getDao()->consulter($url); |
$tableau = (array) json_decode($json, true); |
if ($tableau != false) { |
foreach ($tableau[0]['champs'] as $champ) { |
switch ($champ['type']) { |
case "select" : |
if ($champ['valeur'] != "") { |
$valeurs = split(";", $champ['valeur']); |
$html = '<label for="'.$champ['cle'].'" class="col-sm-3" >'.$champ['label'].'</label>'. |
'<div class="col-sm-8 input-group" >'. |
'<select class="form-control obs-chp-etendu" id="'.$champ['cle'].'"></div>'; |
foreach ( $valeurs as $valeur) { |
$html .= '<option>'.$valeur.'</option>'; |
} |
$html .= "</select>"; |
$retour[] = $html; |
} |
break; |
case "text" : |
$valeurs = split(";", $champ['valeur']); |
$html = '<label for="'.$champ['cle'].'" class="col-sm-3" >'.$champ['label'].'</label>'. |
'<div class="input-group col-sm-8">'. |
'<input id="'.$champ['cle'].'" name="'.$champ['cle'].'" class="form-control" type="text"/> |
</div>'; |
$retour[] = $html; |
break; |
default : |
//$this->verifierChampsCachés(); |
break; |
} |
} |
} |
$url = $this->config['manager']['celChpSupTpl'].'?projet='.$this->parametres['projet'].'&langue='.$this->parametres['langue']; |
$json = $this->getDao()->consulter($url); |
$retour = (array) json_decode($json, true); |
return $retour; |
} |
|