diff --git a/CHANGELOG.md b/CHANGELOG.md index c72349d8946b953a5ad5b2bad953b071ee4b7efa..5732ebe05cc997765eed8f3932af7a0b57fb4e8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,11 @@ CHANGELOG ## [2.4.9] - 2025-XX-XX ### Ajout - [Global] Ajout des champs absents dans les documents Word générés depuis la liste des différents modules. +- [Formulaire] Ajout d'un label aux champs type et liste des structures dans la gestion des droits des modèles d'AIPD et dans les référentiels, ainsi que dans la duplication. - [Accessibilité] Ajout du plan d'actions 2025. - [Bilan] Ajout du score moyen de l'indice de maturité dans le bilan et dans le document Word de synthèse. +- [Référentiels] Ajout du nom de l'élément modifié dans la gestion des droits des référentiels. +- [AIPD] Ajout du nom de l'élément modifié dans la gestion des droits des modèles d'AIPD. - [AIPD] Ajout du modèle XML sur la vidéoprotection mis en oeuvre par les autorités publiques. ### Changement - [Global] Divers renommages et traductions. diff --git a/src/Domain/AIPD/Form/Type/ModeleAnalyseRightsType.php b/src/Domain/AIPD/Form/Type/ModeleAnalyseRightsType.php index 133c8296cc25cc76325e8d98988bd3b2b40f0fc1..7708561415ec8e6d9827bf30cad34c946526731a 100644 --- a/src/Domain/AIPD/Form/Type/ModeleAnalyseRightsType.php +++ b/src/Domain/AIPD/Form/Type/ModeleAnalyseRightsType.php @@ -54,7 +54,7 @@ class ModeleAnalyseRightsType extends AbstractType ]) ->add('authorizedCollectivityTypes', DictionaryType::class, [ 'name' => 'user_collectivity_type', - 'label' => false, + 'label' => 'global.label.organization_type', 'required' => false, 'multiple' => true, 'expanded' => false, @@ -64,7 +64,7 @@ class ModeleAnalyseRightsType extends AbstractType ]) ->add('authorizedCollectivities', EntityType::class, [ 'class' => Collectivity::class, - 'label' => false, + 'label' => 'global.label.organization_list', 'query_builder' => function (EntityRepository $er) { return $er->createQueryBuilder('c') ->orderBy('c.name', 'ASC'); diff --git a/src/Domain/Admin/Form/Type/DuplicationType.php b/src/Domain/Admin/Form/Type/DuplicationType.php index 0504127375c057ece04553f6829078f17a8d6f72..928abee0d59ca5bcb8e31e16a7ebe681a03931af 100644 --- a/src/Domain/Admin/Form/Type/DuplicationType.php +++ b/src/Domain/Admin/Form/Type/DuplicationType.php @@ -106,7 +106,7 @@ class DuplicationType extends AbstractType ]) ->add('targetCollectivityTypes', DictionaryType::class, [ 'name' => 'user_collectivity_type', - 'label' => false, + 'label' => 'global.label.organization_type', 'required' => false, 'multiple' => true, 'expanded' => false, @@ -116,7 +116,7 @@ class DuplicationType extends AbstractType ]) ->add('targetCollectivities', EntityType::class, [ 'class' => UserModel\Collectivity::class, - 'label' => false, + 'label' => 'global.label.organization_list', 'query_builder' => function (EntityRepository $er) { return $er->createQueryBuilder('c') ->orderBy('c.name', 'ASC'); diff --git a/src/Domain/Maturity/Form/Type/ModeleReferentielRightsType.php b/src/Domain/Maturity/Form/Type/ModeleReferentielRightsType.php index f0a00c0a7befcdc900d3a846348d8fe1da180b52..9bf3e6bf565b4c183796ddbfeff3b6c99be33082 100644 --- a/src/Domain/Maturity/Form/Type/ModeleReferentielRightsType.php +++ b/src/Domain/Maturity/Form/Type/ModeleReferentielRightsType.php @@ -54,7 +54,7 @@ class ModeleReferentielRightsType extends AbstractType ]) ->add('authorizedCollectivityTypes', DictionaryType::class, [ 'name' => 'user_collectivity_type', - 'label' => false, + 'label' => 'global.label.organization_type', 'required' => false, 'multiple' => true, 'expanded' => false, @@ -64,7 +64,7 @@ class ModeleReferentielRightsType extends AbstractType ]) ->add('authorizedCollectivities', EntityType::class, [ 'class' => Collectivity::class, - 'label' => false, + 'label' => 'global.label.organization_list', 'query_builder' => function (EntityRepository $er) { return $er->createQueryBuilder('c') ->orderBy('c.name', 'ASC'); diff --git a/templates/Admin/Duplication/new.html.twig b/templates/Admin/Duplication/new.html.twig index fca67fbc9798dca5fbb9233832caef9f6d760755..54f48704e8a5b698c45da9c603c37ddbff78a7ce 100644 --- a/templates/Admin/Duplication/new.html.twig +++ b/templates/Admin/Duplication/new.html.twig @@ -149,16 +149,18 @@ let targetOption = $('#duplication_targetOption input[type=radio]:checked').val(); let targetPerType = $('#duplication_targetCollectivityTypes'); let targetPerCollectivity = $('#duplication_targetCollectivities'); + let targetPerTypeDiv = targetPerType.closest('.form-group'); // Cible le div parent + let targetPerCollectivityDiv = targetPerCollectivity.closest('.form-group'); // Cible le div parent if (targetOption === '{{ constant('App\\Domain\\Admin\\Dictionary\\DuplicationTargetOptionDictionary::KEY_PER_TYPE') }}') { - targetPerType.show(); - targetPerCollectivity.hide(); + targetPerTypeDiv.show(); // Afficher le div + targetPerCollectivityDiv.hide(); // Cacher le div } else if (targetOption === '{{ constant('App\\Domain\\Admin\\Dictionary\\DuplicationTargetOptionDictionary::KEY_PER_COLLECTIVITY') }}') { - targetPerType.hide(); - targetPerCollectivity.show(); + targetPerTypeDiv.hide(); // Cacher le div + targetPerCollectivityDiv.show(); // Afficher le div } else { - targetPerType.hide(); - targetPerCollectivity.hide(); + targetPerTypeDiv.hide(); // Cacher le div + targetPerCollectivityDiv.hide(); // Cacher le div } } diff --git a/templates/Aipd/Modele_analyse/rights.html.twig b/templates/Aipd/Modele_analyse/rights.html.twig index cf9213a9200dc549f10191b8316fc92e7fd58709..ee6988ac8fafbd7cba5c7d172de505f695377338 100644 --- a/templates/Aipd/Modele_analyse/rights.html.twig +++ b/templates/Aipd/Modele_analyse/rights.html.twig @@ -6,7 +6,10 @@ {% block title %}{{ 'aipd.modele_analyse.title.rights'|trans }} - {{ parent() }}{% endblock %} {% block body_head %} - <h1>{{ 'aipd.modele_analyse.title.rights'|trans }}</h1> + <h1> + {{ 'aipd.modele_analyse.title.rights'|trans }} + <small>{{ form.vars.value.nom}}</small> + </h1> {% endblock %} {% block breadcrumb %} @@ -73,16 +76,18 @@ let targetOption = $('#modele_analyse_rights_optionRightSelection input[type=radio]:checked').val(); let targetPerType = $('#modele_analyse_rights_authorizedCollectivityTypes'); let targetPerCollectivity = $('#modele_analyse_rights_authorizedCollectivities'); + let targetPerTypeDiv = targetPerType.closest('.form-group'); // Cible le div parent + let targetPerCollectivityDiv = targetPerCollectivity.closest('.form-group'); // Cible le div parent if (targetOption === '{{ constant('App\\Domain\\Admin\\Dictionary\\DuplicationTargetOptionDictionary::KEY_PER_TYPE') }}') { - targetPerType.show(); - targetPerCollectivity.hide(); + targetPerTypeDiv.show(); // Afficher le div + targetPerCollectivityDiv.hide(); // Cacher le div } else if (targetOption === '{{ constant('App\\Domain\\Admin\\Dictionary\\DuplicationTargetOptionDictionary::KEY_PER_COLLECTIVITY') }}') { - targetPerType.hide(); - targetPerCollectivity.show(); + targetPerTypeDiv.hide(); // Cacher le div + targetPerCollectivityDiv.show(); // Afficher le div } else { - targetPerType.hide(); - targetPerCollectivity.hide(); + targetPerTypeDiv.hide(); // Cacher le div + targetPerCollectivityDiv.hide(); // Cacher le div } } diff --git a/templates/Maturity/Referentiel/rights.html.twig b/templates/Maturity/Referentiel/rights.html.twig index 43a056958bcf5858d97352207239363ca6548aa0..f8ea984c475d99dea35e0224a16d9f5d5d530ffb 100644 --- a/templates/Maturity/Referentiel/rights.html.twig +++ b/templates/Maturity/Referentiel/rights.html.twig @@ -6,7 +6,10 @@ {% block title %}{{ 'maturity.referentiel.title.rights'|trans }} - {{ parent() }}{% endblock %} {% block body_head %} - <h1>{{ 'maturity.referentiel.title.rights'|trans }}</h1> + <h1> + {{ 'maturity.referentiel.title.rights'|trans }} + <small>{{ form.vars.value.name}}</small> + </h1> {% endblock %} {% block breadcrumb %} @@ -76,16 +79,18 @@ let targetOption = $('#modele_referentiel_rights_optionRightSelection input[type=radio]:checked').val(); let targetPerType = $('#modele_referentiel_rights_authorizedCollectivityTypes'); let targetPerCollectivity = $('#modele_referentiel_rights_authorizedCollectivities'); + let targetPerTypeDiv = targetPerType.closest('.form-group'); // Cible le div parent + let targetPerCollectivityDiv = targetPerCollectivity.closest('.form-group'); // Cible le div parent if (targetOption === '{{ constant('App\\Domain\\Admin\\Dictionary\\DuplicationTargetOptionDictionary::KEY_PER_TYPE') }}') { - targetPerType.show(); - targetPerCollectivity.hide(); + targetPerTypeDiv.show(); // Afficher le div + targetPerCollectivityDiv.hide(); // Cacher le div } else if (targetOption === '{{ constant('App\\Domain\\Admin\\Dictionary\\DuplicationTargetOptionDictionary::KEY_PER_COLLECTIVITY') }}') { - targetPerType.hide(); - targetPerCollectivity.show(); + targetPerTypeDiv.hide(); // Cacher le div + targetPerCollectivityDiv.show(); // Afficher le div } else { - targetPerType.hide(); - targetPerCollectivity.hide(); + targetPerTypeDiv.hide(); // Cacher le div + targetPerCollectivityDiv.hide(); // Cacher le div } } diff --git a/translations/messages.fr.yaml b/translations/messages.fr.yaml index 4c72327a75e331e3ef4d9064d1eaea50398c247d..7415ed5fb73e71b5bc3e98db1c5487732847f02a 100644 --- a/translations/messages.fr.yaml +++ b/translations/messages.fr.yaml @@ -39,6 +39,8 @@ global: archived: Archivé not_archived: Non archivé organization: Structure + organization_list: Liste des structures + organization_type: Type de structure service: Service created_at: Date de création created_by : Créé par