-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4981 from open-formulieren/issue/fix-objects-api-…
…prefill-help-text 💬 Tailor field help texts to registration/prefill context
- Loading branch information
Showing
15 changed files
with
171 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...orms/js/components/admin/form_design/registrations/objectsapi/fields/AuthAttributePath.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {useFormikContext} from 'formik'; | ||
import {FormattedMessage} from 'react-intl'; | ||
|
||
import {AuthAttributePath as SharedAuthAttributePath} from 'components/admin/forms/objects_api'; | ||
|
||
const AuthAttributePath = () => { | ||
const { | ||
values: { | ||
objectsApiGroup = null, | ||
objecttype = '', | ||
objecttypeVersion = null, | ||
updateExistingObject = false, | ||
}, | ||
} = useFormikContext(); | ||
return ( | ||
<SharedAuthAttributePath | ||
name={'authAttributePath'} | ||
objectsApiGroup={objectsApiGroup} | ||
objecttypeUuid={objecttype} | ||
objecttypeVersion={objecttypeVersion} | ||
disabled={!updateExistingObject} | ||
required={updateExistingObject} | ||
helpText={ | ||
<FormattedMessage | ||
description="Objects API registration: authAttributePath helpText" | ||
defaultMessage={`The property that gets compared with the identifier (e.g. | ||
BSN/KVK) of the authenticated user to verify ownership of the object being | ||
updated. This is important to prevent malicious users modifying information | ||
of other people than themselves.`} | ||
/> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default AuthAttributePath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.