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

Warning 2Mo pour l'upload de fiche de poste PDF

parent e3afb449
Loading
Loading
Loading
Loading
+2 −1
Changes for module/Application/src/Application/Controller/AgentController.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -383,10 +383,11 @@ class AgentController extends AbstractActionController
        }

        $vm = new ViewModel();
        $vm->setTemplate('application/default/default-form');
        $vm->setTemplate('default/default-form');
        $vm->setVariables([
            'title' => 'Téléverserment d\'un fichier',
            'form' => $form,
            'warning' => "<span class='icon icon-attention'></span> Attention la taille de la fiche de poste ne doit pas dépaser 2 Mo."
        ]);
        return $vm;
    }
+1 −1
Changes for module/Application/src/Application/Service/Agent/AgentService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ class AgentService {
    }


    /** Filtrer les agent·es ayant seulement un statuts de Administratif/Vacataire ou de détaché_out */
    /** Filtrer les agent·es ayant seulement un statut d'Administratif/Vacataire ou de détaché_out */
    public function filtrerByStatutInvalide(Agent $agent, ?DateTime $date = null) : bool
    {
        try {
+3 −1
Changes for module/Application/view/application/agent/partial/fiche-poste.phtml: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -63,7 +63,8 @@ $structure = ($affectation)?$affectation->getStructure():null;

    <?php if ($canAjouterFichier) : ?>
        <div class="alert alert-warning">
            <span class="icon icon-attention"></span> Il ne faut déposer une fiche de poste PDF que si l'agent n'a pas de fiche de poste de renseignée dans EMC2.
            <span class="icon icon-attention"></span> Il ne faut déposer une fiche de poste PDF que si l'agent n'a pas de fiche de poste de renseignée dans EMC2. <br>
            <span class="icon icon-attention"></span> La taille de la fiche de poste ne doit pas dépasser 2 Mo.
        </div>
    <?php endif; ?>

@@ -107,6 +108,7 @@ $structure = ($affectation)?$affectation->getStructure():null;
    <?php endif; ?>

    <?php if ($canAjouterFichier) : ?>
        <?php /** @see \Application\Controller\AgentController::uploadFichePostePdfAction() */ ?>
        <a class="btn btn-primary ajax-modal" data-event="modification"
           href="<?php echo $this->url('agent/upload-fiche-poste-pdf', ['agent' => $agent->getId()], [], true); ?>"
        >
+7 −0
Changes for module/Application/view/default/default-form.phtml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
/**
 * @var Form $form
 * @var string|null $info
 * @var string|null $warning
 */

use Laminas\Form\Form;
@@ -15,6 +16,12 @@ use Laminas\Form\Form;
    </div>
<?php endif; ?>

<?php if ($warning) : ?>
    <div class="alert alert-warning">
        <?php echo $warning; ?>
    </div>
<?php endif; ?>

<?php echo $this->form($form); ?>

<script>
+1 −0
Changes for module/Structure/view/structure/structure/fiches-de-poste.phtml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ $date = new DateTime();
                <?php endif; ?>

                <?php if ($canAjouterFichePoste) : ?>
                    <?php /** @see \Application\Controller\AgentController::uploadFichePostePdfAction() */ ?>
                    <a href="<?php echo $this->url('agent/upload-fiche-poste-pdf', ['agent' => $agent->getId()], [], true); ?>"
                       class="ajax-modal" data-event="modification"
                       title="Ajouter une fiche PDF <br/> <strong><span class='text-danger'><span class='icon icon-attention'></span>Il est préférable de modéliser la fiche de poste dans EMC2</span></strong>"