diff --git a/module/Agent/src/View/Helper/AgentAffectationViewHelper.php b/module/Agent/src/View/Helper/AgentAffectationViewHelper.php index 4f8990e3f740a7bf174c3d3b91a1c371cfe1ed21..02e8c9b9f9456894d0570dcb36a917202cf6957c 100644 --- a/module/Agent/src/View/Helper/AgentAffectationViewHelper.php +++ b/module/Agent/src/View/Helper/AgentAffectationViewHelper.php @@ -20,12 +20,7 @@ use Laminas\View\Resolver\TemplatePathStack; */ class AgentAffectationViewHelper extends AbstractHelper { - /** - * @param AgentAffectation $affectation - * @param array $options - * @return string|Partial - */ - public function __invoke($affectation, $options = []) + public function __invoke(AgentAffectation $affectation, array $options = []): string|Partial { /** @var PhpRenderer $view */ $view = $this->getView(); diff --git a/module/Agent/src/View/Helper/AgentStatutViewHelper.php b/module/Agent/src/View/Helper/AgentStatutViewHelper.php index 3b728cc3e80e0b7ec8d8070cd42c47bfe3ac4698..a86028ef4cf94ceb045aaafeb8edafa6c6f69dcf 100644 --- a/module/Agent/src/View/Helper/AgentStatutViewHelper.php +++ b/module/Agent/src/View/Helper/AgentStatutViewHelper.php @@ -21,12 +21,7 @@ use Laminas\View\Resolver\TemplatePathStack; */ class AgentStatutViewHelper extends AbstractHelper { - /** - * @param AgentStatut $statut - * @param array $options - * @return string|Partial - */ - public function __invoke($statut, $options = []) + public function __invoke(AgentStatut $statut, array $options = []): string|Partial { /** @var PhpRenderer $view */ $view = $this->getView(); diff --git a/module/Application/src/Application/Form/AutocompleteAwareTrait.php b/module/Application/src/Application/Form/AutocompleteAwareTrait.php index 454e2602840ee1e191dc806e9385844be7183e93..e2adaf98dee885ee704d01a9d85d8cba00ed1766 100644 --- a/module/Application/src/Application/Form/AutocompleteAwareTrait.php +++ b/module/Application/src/Application/Form/AutocompleteAwareTrait.php @@ -6,18 +6,12 @@ trait AutocompleteAwareTrait { private $autocomplete; - /** - * @return mixed - */ - public function getAutocomplete() + public function getAutocomplete(): mixed { return $this->autocomplete; } - /** - * @param mixed $autocomplete - */ - public function setAutocomplete($autocomplete) + public function setAutocomplete(mixed $autocomplete): void { $this->autocomplete = $autocomplete; } diff --git a/module/Application/src/Application/View/Helper/AgentViewHelper.php b/module/Application/src/Application/View/Helper/AgentViewHelper.php index 8e937556cd8747d88d5fbab2f728a754c41e2065..ce912076dce0970690ec11b010a5bd2c5d418f53 100644 --- a/module/Application/src/Application/View/Helper/AgentViewHelper.php +++ b/module/Application/src/Application/View/Helper/AgentViewHelper.php @@ -3,7 +3,6 @@ namespace Application\View\Helper; use Agent\Entity\Db\Agent; -use Application\View\Renderer\PhpRenderer; use Laminas\View\Helper\AbstractHelper; use Laminas\View\Helper\Partial; use Laminas\View\Resolver\TemplatePathStack; @@ -17,9 +16,8 @@ class AgentViewHelper extends AbstractHelper * @param array $options * @return string|Partial */ - public function __invoke($agent, $mode = 'affichage', $options = []) + public function __invoke(Agent $agent, string $mode = 'affichage', array $options = []): string|Partial { - /** @var PhpRenderer $view */ $view = $this->getView(); $view->resolver()->attach(new TemplatePathStack(['script_paths' => [__DIR__ . "/partial"]])); diff --git a/module/DemandeExterne/src/Controller/DemandeExterneController.php b/module/DemandeExterne/src/Controller/DemandeExterneController.php index 4bd81db7cbd6ee3a3c65bc7f72c09e608bac13b2..b1aa2709117684e23cf6f3f5e3ae46107c90d195 100644 --- a/module/DemandeExterne/src/Controller/DemandeExterneController.php +++ b/module/DemandeExterne/src/Controller/DemandeExterneController.php @@ -593,7 +593,7 @@ class DemandeExterneController extends AbstractActionController 'title' => "Transformation de la demande en formation", 'form' => $form, ]); - $vm->setTemplate('formation/default/default-form'); + $vm->setTemplate('default/default-form'); return $vm; } @@ -635,7 +635,7 @@ class DemandeExterneController extends AbstractActionController } $vm = new ViewModel(); - $vm->setTemplate('formation/default/default-form'); + $vm->setTemplate('default/default-form'); $vm->setVariables([ 'title' => "Téléverserment d'un devis pour la formation", 'form' => $form, @@ -679,7 +679,7 @@ class DemandeExterneController extends AbstractActionController } $vm = new ViewModel(); - $vm->setTemplate('formation/default/default-form'); + $vm->setTemplate('default/default-form'); $vm->setVariables([ 'title' => 'Téléverserment du programme de la formation', 'form' => $form, diff --git a/module/Fichier/src/Fichier/Entity/Db/Fichier.php b/module/Fichier/src/Fichier/Entity/Db/Fichier.php index 78a283878c2f5eeb2f2afe5d6298276a84299825..2dd7d66e0ee66eb6fe62136f53b60b43d70ef767 100644 --- a/module/Fichier/src/Fichier/Entity/Db/Fichier.php +++ b/module/Fichier/src/Fichier/Entity/Db/Fichier.php @@ -9,122 +9,74 @@ use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait; class Fichier implements HistoriqueAwareInterface { use HistoriqueAwareTrait; - /** @var string */ - private $id; - /** @var string */ - private $nomOriginal; - /** @var string */ - private $nomStockage; - /** @var Nature */ - private $nature; - /** @var string */ - private $typeMime; - /** @var string */ - private $taille; - - /** - * @return string - */ - public function getId() + private ?string $id = null; + private ?string $nomOriginal = null; + private ?string $nomStockage = null; + private ?Nature $nature = null; + private ?string $typeMime = null; + private ?string $taille = null; + + public function getId(): ?string { return $this->id; } - /** - * @param string $id - * @return Fichier - */ - public function setId($id) + public function setId(string $id): Fichier { $this->id = $id; return $this; } - /** - * @return string - */ - public function getNomOriginal() + public function getNomOriginal(): ?string { return $this->nomOriginal; } - /** - * @param string $nomOriginal - * @return Fichier - */ - public function setNomOriginal($nomOriginal) + public function setNomOriginal(string $nomOriginal): Fichier { $this->nomOriginal = $nomOriginal; return $this; } - /** - * @return string - */ - public function getNomStockage() + public function getNomStockage(): ?string { return $this->nomStockage; } - /** - * @param string $nomStockage - * @return Fichier - */ - public function setNomStockage($nomStockage) + public function setNomStockage(string $nomStockage): Fichier { $this->nomStockage = $nomStockage; return $this; } - /** - * @return Nature - */ - public function getNature() + public function getNature(): ?Nature { return $this->nature; } - /** - * @param Nature $nature - * @return Fichier - */ - public function setNature($nature) + public function setNature(Nature $nature): Fichier { $this->nature = $nature; return $this; } - /** - * @return string - */ - public function getTypeMime() + public function getTypeMime(): ?string { return $this->typeMime; } - /** - * @param string $typeMime - * @return Fichier - */ - public function setTypeMime($typeMime) + public function setTypeMime(string $typeMime): Fichier { $this->typeMime = $typeMime; return $this; } - /** - * @return string - */ - public function getTaille() + public function getTaille(): ?string { return $this->taille; } - /** - * @param string $taille - * @return Fichier - */ - public function setTaille($taille) + public function setTaille(string $taille): Fichier { $this->taille = $taille; return $this; diff --git a/module/Fichier/src/Fichier/Entity/Db/Nature.php b/module/Fichier/src/Fichier/Entity/Db/Nature.php index 45cbb22f0b36a11857894aa045f2d2d0ce668cba..3078cd87f1702a1ecd8812f73eb41aa8d98c8dc2 100644 --- a/module/Fichier/src/Fichier/Entity/Db/Nature.php +++ b/module/Fichier/src/Fichier/Entity/Db/Nature.php @@ -8,57 +8,32 @@ use Application\Entity\Db\Traits\HasDescriptionTrait; class Nature implements HasDescriptionInterface { use HasDescriptionTrait; - const CV = 'CV'; - const MOTIV = 'MOTIV'; - const FORMATION = 'FORMATION'; - const AUTRE = 'AUTRE'; + private ?int $id = null; + private ?string $code = null; + private ?string $libelle = null; - /** @var integer */ - private $id; - /** @var string */ - private $code; - /** @var string */ - private $libelle; - - /** - * @return int - */ - public function getId() + public function getId(): ?int { return $this->id; } - /** - * @return string - */ - public function getCode() + public function getCode(): ?string { return $this->code; } - /** - * @param string $code - * @return Nature - */ - public function setCode($code) + public function setCode(?string $code): Nature { $this->code = $code; return $this; } - /** - * @return string - */ - public function getLibelle() + public function getLibelle(): ?string { return $this->libelle; } - /** - * @param string $libelle - * @return Nature - */ - public function setLibelle($libelle) + public function setLibelle(?string $libelle): Nature { $this->libelle = $libelle; return $this; diff --git a/module/Formation/src/Formation/Controller/AbonnementController.php b/module/Formation/src/Formation/Controller/AbonnementController.php index 3365c2e0dff23c10f51530ed2870b8706f51d229..583ad7b8985a27a01916c7024c2ee26a9dd8849e 100644 --- a/module/Formation/src/Formation/Controller/AbonnementController.php +++ b/module/Formation/src/Formation/Controller/AbonnementController.php @@ -46,7 +46,7 @@ class AbonnementController extends AbstractActionController 'title' => "Ajouter un abonnement à un agent", 'form' => $form, ]); - $vm->setTemplate('formation/default/default-form'); + $vm->setTemplate('default/default-form'); return $vm; } diff --git a/module/Formation/src/Formation/Controller/InscriptionController.php b/module/Formation/src/Formation/Controller/InscriptionController.php index a59e1de5eb9a3d5e53ad1576322e4f91b144c06a..8b028e96ee7b97cc837fc0930028d867ed100748 100644 --- a/module/Formation/src/Formation/Controller/InscriptionController.php +++ b/module/Formation/src/Formation/Controller/InscriptionController.php @@ -549,7 +549,7 @@ class InscriptionController extends AbstractActionController } $vm = new ViewModel(); - $vm->setTemplate('formation/default/default-form'); + $vm->setTemplate('default/default-form'); $vm->setVariables([ 'title' => 'Téléverserment d\'un fichier', 'form' => $form, diff --git a/module/Formation/src/Formation/Controller/SessionParametreController.php b/module/Formation/src/Formation/Controller/SessionParametreController.php index de2141c583144462f3e0c6d4479cf8f7973d2956..1dcf4caa557c8ecbaf541435e9581889817b64c5 100644 --- a/module/Formation/src/Formation/Controller/SessionParametreController.php +++ b/module/Formation/src/Formation/Controller/SessionParametreController.php @@ -44,7 +44,7 @@ class SessionParametreController extends AbstractActionController 'title' => "Paramètre de la session de formation", 'form' => $form, ]); - $vm->setTemplate('formation/default/default-form'); + $vm->setTemplate('default/default-form'); return $vm; } } \ No newline at end of file diff --git a/module/Formation/view/formation/default/confirmation.phtml b/module/Formation/view/formation/default/confirmation.phtml deleted file mode 100644 index fee475be2637a25023650a31fc2ef9a83d5c5661..0000000000000000000000000000000000000000 --- a/module/Formation/view/formation/default/confirmation.phtml +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -/** - * @var string $title - * @var string $text - * @var string $action - * @var bool $complement - */ - -?> - -<p class="lead"> -<?php echo $text; ?> -</p> - -<div class="row"> - <div class="col-md-4"> - <form method="post" action="<?php echo $action; ?>"> -<table> - <tr><td> - <input type="hidden" name="reponse" value="oui"> - <input type="submit" name="oui" class="btn btn-success action" value="Oui, je suis sûr·e"> - <?php if ($complement === 'oui') : ?> - </td><td> - <label for="complement">Compléments liés à l'acceptation</label> - <textarea id="complement" name="complement" class="type2 form-control" style="width: 100%;"></textarea> - <?php endif; ?> - - </td></tr> -</table> -</form> - </div> - <div class="col-md-4"> - <form method="post" action="<?php echo $action; ?>"> -<table> - <tr><td> - <input type="hidden" name="reponse" value="non"> - <input type="submit" id="non" name="non" class="btn btn-danger action" value="Non, je ne veux pas"> - <?php if ($complement === 'non') : ?> - </td><td> - <label for="complement">Compléments liés au refus</label> - <textarea id="complement" name="complement" class="type2 form-control" style="width: 100%;"></textarea> - <?php endif; ?> - - </td></tr> -</table> -</form> - </div> -</div> - -<?php if ($complement !== true) : ?> - <script> - $(function() { - $("input#non").click(function(e){ - $('div.modal').modal('hide'); - e.preventDefault(); - }); - }); - </script> -<?php else : ?> - <script> - $(document).ready(function() { - tinymce.remove(); - tinymce.init({ - selector: '.tinymce', - toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist', - resize: true, - language: 'fr_FR', - plugins: 'lists', - statusbar: true, - browser_spellcheck : true, - branding: false, - menu: {}, - body_id: 'complement', - setup: function (editor) { - editor.on("focusout", function () { - console.log(tinymce.get('complement').getContent()); - $('textarea').val(tinymce.get('complement').getContent()); - }); - } - }); - }); - - $('select').selectpicker(); - </script> -<?php endif; ?> - diff --git a/module/Formation/view/formation/default/default-form.phtml b/module/Formation/view/formation/default/default-form.phtml deleted file mode 100644 index 2f59782281368438cf1ae80806683888a4c6fa91..0000000000000000000000000000000000000000 --- a/module/Formation/view/formation/default/default-form.phtml +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/** - * @var Form $form - */ - -use Laminas\Form\Form; - -?> - -<?php echo $this->form($form); ?> - -<script> - $(document).ready(function() { - tinymce.remove(); - tinymce.init({ - selector: '.tinymce', - toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist', - resize: true, - language: 'fr_FR', - plugins: 'lists', - statusbar: true, - browser_spellcheck : true, - branding: false, - menu: {}, - body_id: 'description', - setup: function (editor) { - editor.on("focusout", function () { - console.log(tinymce.get('description').getContent()); - $('textarea#description').val(tinymce.get('description').getContent()); - }); - } - }); - }); - - $('select').selectpicker(); -</script> - -<style> - .ui-datepicker{ - position: absolute; - z-index:1050 !important; - } - /*div.ui-datepicker {*/ - /* position: absolute;*/ - /* z-index:1050;*/ - /* }*/ - /* select.ui-datepicker-year option{*/ - /* position: absolute;*/ - /* z-index:3151 !important;*/ - /* }*/ - -</style> \ No newline at end of file diff --git a/module/Formation/view/formation/default/probleme.phtml b/module/Formation/view/formation/default/probleme.phtml deleted file mode 100644 index 55666398d1e69e9245c2512361a06fee8759b8b3..0000000000000000000000000000000000000000 --- a/module/Formation/view/formation/default/probleme.phtml +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -/** - * @var string $title - * @var string $text - */ - -?> - -<div class="alert alert-danger"> - <p class="lead"> - <?php echo $text; ?> - </p> -</div> - diff --git a/module/Formation/view/formation/default/reponse.phtml b/module/Formation/view/formation/default/reponse.phtml deleted file mode 100644 index 9026c479fe531a4795d59242ae504481932aac1d..0000000000000000000000000000000000000000 --- a/module/Formation/view/formation/default/reponse.phtml +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -/** - * @var string $reponse - */ - -?> -<?php echo $reponse; ?>