Commit a35eea3e authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Fixing cas vide

parent a2bbbdc3
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ use UnicaenAutoform\Entity\Db\Champ;
    <?php echo $champ->getLibelle(); ?>&nbsp;:
    <?php $libelles = explode(';',$champ->getOptions()); ?>
    <?php $size = max(count($libelles), count($splits)); ?>
    <div>
    <ul >
        <?php for($position = 0 ; $position < $size ; $position ++) : ?>
            <li>
@@ -24,4 +25,5 @@ use UnicaenAutoform\Entity\Db\Champ;
            </li>
        <?php endfor; ?>
    </ul>
    </div>
<?php endif; ?>
+19 −14
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ $nbFields = count($fields);
$libelles = [];
foreach ($fields as $field) {
    $liste = explode('|',$field);
    $libelles[] = $liste[1];
    $libelles[] = $liste[1]??"Aucun·e";
}

$reponses = explode(Champ::SEPARATOR_PLUS_CUSTOM_GROUP, (string) $data);
@@ -20,6 +20,9 @@ $reponses = explode(Champ::SEPARATOR_PLUS_CUSTOM_GROUP, (string) $data);
?>

<?php echo $champ->getLibelle(); ?>&nbsp;:
<?php if (empty($reponses) OR str_replace(";","",$reponses[0]) === "") : ?>
    aucun·e
<?php else : ?>
    <?php foreach ($reponses as $reponse) : ?>
        <ul>
            <?php if ($data !== 'null') : ?>
@@ -32,4 +35,6 @@ $reponses = explode(Champ::SEPARATOR_PLUS_CUSTOM_GROUP, (string) $data);
                <?php endforeach; ?>
            <?php endif; ?>
        </ul>
        <br>
    <?php endforeach; ?>
<?php endif; ?>
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ use UnicaenAutoform\Entity\Db\Champ;
    <?php echo $champ->getLibelle(); ?>&nbsp;:
    <?php echo $libelles = explode(';',$champ->getOptions()); ?>
    <?php $size = max(count($libelles), count($splits)); ?>
    <ul>
    <ul srt>
        <?php for($position = 0 ; $position < $size ; $position ++) : ?>
            <li>
                <?php $sub = explode("|", $libelles[$position]); ?>