From 82e76ec818262ad8ffd42a97aacf6933474b92e2 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Mon, 30 Dec 2024 09:31:12 +0100 Subject: [PATCH] :bug: Properly mark 'auth attribute path' required The field was missing the styling on the label that indicates it's a required field. For prefill, this field is always required. For registration, it's required when the option to update the existing object is toggled. --- .../form_design/registrations/objectsapi/LegacyConfigFields.js | 1 + .../form_design/registrations/objectsapi/V2ConfigFields.js | 1 + .../variables/prefill/objects_api/ObjectsAPIFields.js | 2 +- .../js/components/admin/forms/objects_api/AuthAttributePath.js | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openforms/js/components/admin/form_design/registrations/objectsapi/LegacyConfigFields.js b/src/openforms/js/components/admin/form_design/registrations/objectsapi/LegacyConfigFields.js index acb7a3eb98..f9837753da 100644 --- a/src/openforms/js/components/admin/form_design/registrations/objectsapi/LegacyConfigFields.js +++ b/src/openforms/js/components/admin/form_design/registrations/objectsapi/LegacyConfigFields.js @@ -135,6 +135,7 @@ const LegacyConfigFields = ({apiGroupChoices}) => { objecttypeUuid={objecttype} objecttypeVersion={objecttypeVersion} disabled={!updateExistingObject} + required={updateExistingObject} /> diff --git a/src/openforms/js/components/admin/form_design/registrations/objectsapi/V2ConfigFields.js b/src/openforms/js/components/admin/form_design/registrations/objectsapi/V2ConfigFields.js index 49f55bf670..d1f87d8436 100644 --- a/src/openforms/js/components/admin/form_design/registrations/objectsapi/V2ConfigFields.js +++ b/src/openforms/js/components/admin/form_design/registrations/objectsapi/V2ConfigFields.js @@ -158,6 +158,7 @@ const V2ConfigFields = ({apiGroupChoices}) => { objecttypeUuid={objecttype} objecttypeVersion={objecttypeVersion} disabled={!updateExistingObject} + required={updateExistingObject} /> diff --git a/src/openforms/js/components/admin/form_design/variables/prefill/objects_api/ObjectsAPIFields.js b/src/openforms/js/components/admin/form_design/variables/prefill/objects_api/ObjectsAPIFields.js index 6be8dbbd0f..98dcf49ce1 100644 --- a/src/openforms/js/components/admin/form_design/variables/prefill/objects_api/ObjectsAPIFields.js +++ b/src/openforms/js/components/admin/form_design/variables/prefill/objects_api/ObjectsAPIFields.js @@ -240,7 +240,7 @@ const ObjectsAPIFields = () => { objectsApiGroup={objectsApiGroup} objecttypeUuid={objecttypeUuid} objecttypeVersion={objecttypeVersion} - style={{maxWidth: '10em'}} + required /> diff --git a/src/openforms/js/components/admin/forms/objects_api/AuthAttributePath.js b/src/openforms/js/components/admin/forms/objects_api/AuthAttributePath.js index ee3e52c8a5..9392f4fdb9 100644 --- a/src/openforms/js/components/admin/forms/objects_api/AuthAttributePath.js +++ b/src/openforms/js/components/admin/forms/objects_api/AuthAttributePath.js @@ -17,6 +17,7 @@ const AuthAttributePath = ({ objecttypeUuid, objecttypeVersion, disabled = false, + required = false, }) => { const intl = useIntl(); const {csrftoken} = useContext(APIContext); @@ -66,6 +67,7 @@ const AuthAttributePath = ({ /> } disabled={disabled} + required={required} >