From 269ab07ec8ce0c5997ba19b949aeb1bfd3226336 Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Mon, 29 Jun 2026 21:55:27 +0200 Subject: [PATCH] Fix control-panel property widgets hidden by pat-autotoc (#154) The new control-panel UX added pat-autotoc with 'section: fieldset', which treats every
as a tab section. yafowil.widget.dict / .array (2.0) wrap themselves in a nested, legend-less
, so the user/group property-mapping widgets were turned into empty autotoc sections and hidden in the Plone control panel (the ZMI, which has no pat-autotoc, still showed them). Scope the tabbing to the top-level 'fieldset.formPanel' sections (server/users/groups/cache) so the nested widget fieldsets are left alone. Fixes #154. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGES.md | 8 ++++++++ src/pas/plugins/ldap/properties.yaml | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index a1c3437..dbdac52 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,14 @@ ## 2.0.0 (unreleased) +- Fix the user/group property-mapping widgets disappearing from the Plone + control panel: scope the `pat-autotoc` tabbing to the top-level + `fieldset.formPanel` sections so it no longer hides the nested, legend-less + fieldsets rendered by the `yafowil.widget.dict` / `yafowil.widget.array` + widgets. + Fixes [issue #154](https://github.com/collective/pas.plugins.ldap/issues/154). + [jensens] + - Derive the package version from git tags via `hatch-vcs` (the static `version` in `pyproject.toml` is gone). Releases are now made by tagging. [jensens] diff --git a/src/pas/plugins/ldap/properties.yaml b/src/pas/plugins/ldap/properties.yaml index af73cbe..5e93db5 100644 --- a/src/pas/plugins/ldap/properties.yaml +++ b/src/pas/plugins/ldap/properties.yaml @@ -4,7 +4,13 @@ props: action: expr:context.action class: edit-form enableFormTabbing pat-autotoc enableUnloadProtection data: - pat-autotoc: "levels: legend; section: fieldset; className: autotabs" + # Scope the auto-TOC tabbing to the top-level section fieldsets only + # (server/users/groups/cache all carry the ``formPanel`` class). + # A bare ``section: fieldset`` also matched the nested, legend-less + # ``
`` wrappers that yafowil.widget.dict / .array render, + # which made pat-autotoc hide the user/group property-mapping widgets + # in the Plone control panel (see issue #154). + pat-autotoc: "levels: legend; section: fieldset.formPanel; className: autotabs" widgets: - server: factory: "*userpassanon:fieldset"