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

Le tooltip pour les métiers échappe maintenant les caractères html et les quote.

parent 0e2476ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
Version 3.2.5 (XX/XX/2023)
Version 3.2.6 (11/07/2023)
====

Évolution
+31 −0
Original line number Diff line number Diff line
Version 3.2.7 (XX/XX/2023)
====

Évolution
---
- [FIX] Le tooltip pour les métiers échappe maintenant les caractères html et les quote.

Modification en BD
---

```postgresql
```

Evolution des librairies 
---



```bash
```

ou réinstalle des libraires 
```bash
rm -fr vendor
rm -fr composer.lock
composer install
```

Evolution des macros et templates 
---
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ $date = new DateTime();
                                <td class="encours">
                                    <?php $fin = ($ficheposte->getFinValidite()); ?>
                                    <?php if (($fin === null OR $fin >= $date) AND $etat->getCode() === FichePosteEtats::ETAT_CODE_SIGNEE)  echo "<span class='icon icon-checked' style='color:darkgreen;' title='Fiche de poste en cours de validité'></span>"; ?>
                                    <?php if ($fin !== null AND $fin < $date   AND $etat->getCode() === FichePosteEtats::ETAT_CODE_SIGNEE)  echo "<span style='color:darkred;' title='Fiche de poste historisée | Fin de validité : ". $fin->format('d/m/Y')."' data-toogle='tooltip' data-html='true'>".$fin->format('d/m/Y')."</span>"; ?>
                                    <?php if ($fin !== null AND $fin < $date   AND $etat->getCode() === FichePosteEtats::ETAT_CODE_SIGNEE)  echo "<span style='color:darkred;' title='Fiche de poste historisée | Fin de validité : ". $fin->format('d/m/Y')."' data-toogle='tooltip' data-bs-html='true'>".$fin->format('d/m/Y')."</span>"; ?>
                                    <?php if ($fin === null                    AND $etat->getCode() !== FichePosteEtats::ETAT_CODE_SIGNEE)  echo "<span class='icon sursis' style='color:cadetblue;' title='Fiche en cours de redaction ou fiche ayant pas été validée'></span>"; ?>
                                </td>
                                <td class="etat">
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ $this->headTitle('Index des fiches métiers');
            <tr <?php if ($fiche->estHistorise()) echo "class='historise'"; ?> >
                <td>
                <span title='<?php echo $fiche->getMetier()->generateTooltip(); ?>'
                      data-toggle='tooltip' data-html='true'
                      data-bs-toggle='tooltip' data-bs-html='true'
                >
                    <?php echo $fiche->getMetier()->getLibelle(true); ?>
                </span>
+15 −6
Original line number Diff line number Diff line
@@ -138,19 +138,28 @@ class Metier implements HistoriqueAwareInterface {
    public function generateTooltip() : string
    {
        $html  = '';
        /** ligne sur le metier **/
        $html .= '<span class="highlight metier">'.htmlentities($this->getLibelle(),ENT_QUOTES).'</span><br/>';
        /** lignes sur les domaines du metier **/
        /** Ligne sur le metier **/
        $html .= '<span class="highlight metier">';
        $html .= htmlentities($this->getLibelle(), ENT_QUOTES);
        $html .= '</span><br/>';

        /** Lignes sur les domaines du metier **/
        $html .= '<strong>Domaines</strong> :';
        $html .= '<ul>';
        foreach ($this->getDomaines() as $domaine) {
            $html .= '<li>'.$domaine->getLibelle().'</li>';
            $html .= '<li>';
            $html .= htmlentities($domaine->getLibelle(), ENT_QUOTES);
            $html .= '</li>';
        }
        $html .= '</ul>';
        /** ligne sur les refs */
        /** Ligne sur les refs */
        $html .= '<strong>Références</strong> :';
        foreach ($this->getReferences() as $reference) {
            $html .= '<span class="badge" style="margin:0.25rem;">'.$reference->getReferentiel()->getLibelleCourt().' - '.$reference->getCode().'</span><br/>';
            $html .= '<span class="badge" style="margin:0.25rem;">';
            $html .= htmlentities($reference->getReferentiel()->getLibelleCourt(), ENT_QUOTES);
            $html .= ' - ';
            $html .= htmlentities($reference->getCode(), ENT_QUOTES);
            $html .= '</span><br/>';
        }
        return '<span style="text-align:left;">'.$html.'</span>';
    }
Loading