From c184644f1734ff6930a39f79a43666de8c9a5207 Mon Sep 17 00:00:00 2001 From: nicod_ <nicod@lerebooteux.fr> Date: Fri, 14 Apr 2023 16:13:34 +0200 Subject: [PATCH] =?UTF-8?q?Un=20bloc=20ne=20peut=20pas=20=C3=AAtre=20paren?= =?UTF-8?q?t=20de=20lui=20m=C3=AAme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- formulaires/editer_blocs_type.php | 3 +-- saisies/blocs_types.html | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/formulaires/editer_blocs_type.php b/formulaires/editer_blocs_type.php index af4dcc4..2ef186f 100644 --- a/formulaires/editer_blocs_type.php +++ b/formulaires/editer_blocs_type.php @@ -50,9 +50,8 @@ function formulaires_editer_blocs_type_saisies_dist($id_blocs_type = 'new', $ret 'saisie' => 'blocs_types', 'options' => [ 'nom' => 'id_blocs_type_parent', - 'label' => _T('blocs_type:champ_id_blocs_type_parent_label'), - + 'exclus' => [(int)$id_blocs_type], ], ], diff --git a/saisies/blocs_types.html b/saisies/blocs_types.html index 59d00c4..9209c3d 100644 --- a/saisies/blocs_types.html +++ b/saisies/blocs_types.html @@ -1,7 +1,10 @@ <select name="#ENV{nom}" id="champ_[(#ENV{nom}|saisie_nom2classe)]"[ class="(#ENV{class})"][ disabled="(#ENV{disable})"]> [(#ENV{cacher_option_intro}|non) <option value="">[(#ENV{option_intro})]</option>] - <BOUCLE_blocs_types(BLOCS_TYPES){id_blocs_type?}{id_blocs_type_parent?}{recherche?}{tout}{par num titre, titre}> + <BOUCLE_blocs_types(BLOCS_TYPES) + {id_blocs_type !IN #ENV{exclus}} + {id_blocs_type?}{id_blocs_type_parent?}{recherche?} + {tout}{par num titre, titre}> <option value="#ID_BLOCS_TYPE"[(#ID_BLOCS_TYPE|=={#ENV{valeur_forcee,#ENV{valeur,#ENV{defaut}}}}|oui) selected="selected"]>#TITRE</option> </BOUCLE_blocs_types> </select> -- GitLab