Skip to content

Commit

Permalink
✨ [open-formulieren/open-forms#4542] Add email address verification o…
Browse files Browse the repository at this point in the history
…ption to builder form
  • Loading branch information
sergei-maertens committed Aug 19, 2024
1 parent 092fe58 commit 4d58c25
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/registry/email/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const EditForm: EditFormDefinition<EmailComponentSchema> = () => {
{/* Validation tab */}
<TabPanel>
<Validate.Required />
<RequireVerification />
<Validate.ValidatorPluginSelect />
<Validate.ValidationErrorTranslations />
</TabPanel>
Expand Down Expand Up @@ -190,4 +191,26 @@ const IsConfirmationRecipient: React.FC = () => {
);
};

const RequireVerification = () => {
const intl = useIntl();
const tooltip = intl.formatMessage({
description: "Tooltip for email 'openForms.requireVerification' builder field",
defaultMessage: `When email address verification is enabled, the user must verify
their email address before they can submit the form. This proves the email address
exists and that they have access to the account.`,
});
return (
<Checkbox
name="openForms.requireVerification"
label={
<FormattedMessage
description="Label for email 'openForms.requireVerification' builder field"
defaultMessage="Require verification"
/>
}
tooltip={tooltip}
/>
);
};

export default EditForm;

0 comments on commit 4d58c25

Please sign in to comment.