-
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.
💬 Tailor field help texts to registration/prefill context
- Loading branch information
1 parent
f22ab32
commit 61d59d3
Showing
10 changed files
with
119 additions
and
69 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
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
Oops, something went wrong.