From 9378fe0ed1afb47b925611b031215d6f6e173d58 Mon Sep 17 00:00:00 2001 From: josegar74 Date: Tue, 23 Jun 2026 07:12:01 +0200 Subject: [PATCH 1/2] Metadata editor / add a configuration to define mandatory keywords from a thesaurus --- schemas/config-editor.xsd | 1 + .../iso19115-3.2018/layout/layout-custom-fields-keywords.xsl | 1 + .../plugin/iso19139/layout/layout-custom-fields-keywords.xsl | 1 + 3 files changed, 3 insertions(+) diff --git a/schemas/config-editor.xsd b/schemas/config-editor.xsd index 2037b9f9f3bd..039c1a506180 100644 --- a/schemas/config-editor.xsd +++ b/schemas/config-editor.xsd @@ -1022,6 +1022,7 @@ Conversion are defined in `convert/thesaurus-transformation.xsl`. + diff --git a/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout-custom-fields-keywords.xsl b/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout-custom-fields-keywords.xsl index d3be4d4b7e3d..7f1ecb29ce22 100644 --- a/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout-custom-fields-keywords.xsl +++ b/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout-custom-fields-keywords.xsl @@ -261,6 +261,7 @@ data-max-tags="{$maxTags}" data-browsable="{not($thesaurusConfig/@browsable) or $thesaurusConfig/@browsable != 'false'}" + data-required="{if ($thesaurusConfig/@mandatory = 'true') then 'true' else 'false'}" data-order-by-id="{$orderById}" data-lang="{$metadataOtherLanguagesAsJson}" data-textgroup-only="false"> diff --git a/schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields-keywords.xsl b/schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields-keywords.xsl index d1a18927e142..713d82ee2020 100644 --- a/schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields-keywords.xsl +++ b/schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields-keywords.xsl @@ -299,6 +299,7 @@ data-max-tags="{$maxTags}" data-browsable="{not($thesaurusConfig/@browsable) or $thesaurusConfig/@browsable != 'false'}" + data-required="{if ($thesaurusConfig/@mandatory = 'true') then 'true' else 'false'}" data-order-by-id="{$orderById}" data-lang="{$metadataOtherLanguagesAsJson}" data-textgroup-only="false"> From 29beb2ff85378e8ee0541f94f9d94f258f85de2e Mon Sep 17 00:00:00 2001 From: Juan Luis Rodriguez Ponce Date: Tue, 23 Jun 2026 12:24:57 +0200 Subject: [PATCH 2/2] Document thesaurus configuration attributes in custom editor guide Add a reference table for the element attributes (key, maxtags, orderById, fieldset, browsable, transformations and the new mandatory attribute) in the custom editor documentation. Note that mandatory is a visual required indicator only and does not enforce keyword selection on save. --- .../editor-ui/creating-custom-editor.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/manual/docs/customizing-application/editor-ui/creating-custom-editor.md b/docs/manual/docs/customizing-application/editor-ui/creating-custom-editor.md index b0c265b91a0b..b4d1ff23c6a4 100644 --- a/docs/manual/docs/customizing-application/editor-ui/creating-custom-editor.md +++ b/docs/manual/docs/customizing-application/editor-ui/creating-custom-editor.md @@ -334,6 +334,18 @@ e.g. only 2 INSPIRE themes: ``` +The `` element supports the following attributes: + +| Attribute | Description | +|-----------|-------------| +| `key` | (Required) The thesaurus identifier (e.g. `external.theme.httpinspireeceuropaeutheme-theme`). | +| `maxtags` | Maximum number of keywords that can be selected. Unlimited if not set. | +| `orderById` | When `true`, keywords are ordered by their identifier instead of by label. Defaults to `false`. | +| `fieldset` | When `false`, the widget is rendered as a simple field instead of being boxed in a fieldset. | +| `browsable` | When `false`, the keyword browse/tree control is hidden and keywords can only be searched. Defaults to `true`. | +| `transformations` | Comma-separated list of allowed encodings for the keywords (see `convert/thesaurus-transformation.xsl`). Falls back to the `defaultTransformation` defined on `` when empty. | +| `mandatory` | When `true`, the field is flagged as required in the editor (displays the required indicator). Note this is a visual indicator only; it does not enforce keyword selection on save. Defaults to `false`. | + ## Configuring the side panel {#creating-custom-editor-sidePanel} The side panel is configured by adding `` elements or `` elements to the `` element within a ``.