From 95ee722b28a60386e7363fd6c0a74a6aa117b5e8 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Tue, 21 Oct 2025 14:09:31 +0100 Subject: [PATCH] Bug 41063: Allow setting of a group for additional fields Adds support for the extendedAttributesFieldGroup configuration option in base-resource.js composable. This allows developers to specify which form section/group additional fields should appear in, providing better control over form organization and UX. Without this, additional fields always appeared in the default group, making it difficult to logically organize complex forms with multiple field groupings. Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/js/vue/composables/base-resource.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js index 3c0188f4841..df7a2244be8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js @@ -38,6 +38,7 @@ import { * @param {Function} resourceConfig.afterResourceFetch - A function to call after the resource is fetched. This can be used to edit resource data or fetch additional data * @param {Boolean} resourceConfig.embedded - A flag to indicate whether the resource is actually being used as a child component of another resource e.g. embedding a list of agreeements into EBSCO package agreements * @param {String} resourceConfig.extendedAttributesResourceType - The resource type for extended attributes, if applicable. + * @param {String} resourceConfig.extendedAttributesFieldGroup - The field group that you would like the additional fields to be displayed in. * @param {Function} resourceConfig.defaultToolbarButtons - A function to amend default buttons in the toolbar. * @param {Function} resourceConfig.additionalToolbarButtons - A function to add additional buttons to the toolbar. * @param {String} resourceConfig.formGroupsDisplayMode - The display mode for the form groups if not the default. Can be one of the following: "accordion", "tabs". @@ -433,6 +434,9 @@ export function useBaseResource(resourceConfig) { type: "additional_fields", extended_attributes_resource_type: resourceConfig.extendedAttributesResourceType, + ...(resourceConfig.extendedAttributesFieldGroup && { + group: resourceConfig.extendedAttributesFieldGroup, + }), }); } const groupings = attributesToConsider.reduce((acc, attr) => { -- 2.51.1