Skip to content

Commit

Permalink
💄 [open-formulieren/open-forms#5046] Remove login buttons when submis…
Browse files Browse the repository at this point in the history
…sion limit is reached

Doesn't make much sense to show these buttons if users are unable to start a form because the submission limit has been reached.
  • Loading branch information
viktorvanwijk committed Feb 18, 2025
1 parent c1f7d7e commit db553bf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/FormStart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ const FormStart = () => {
? {initial_data_reference: initialDataReference}
: {};

// If there is no active submission, only show the login options if the submission limit has not
// been reached.
const showLoginOptions = !hasActiveSubmission && !form.submissionLimitReached;

return (
<LiteralsProvider literals={form.literals}>
<Card title={form.name}>
Expand All @@ -166,13 +170,15 @@ const FormStart = () => {

<FormStartMessage form={form} />

{hasActiveSubmission ? (
{hasActiveSubmission && (
<ExistingSubmissionOptions
form={form}
onDestroySession={onDestroySession}
isAuthenticated={isAuthenticated}
/>
) : (
)}

{showLoginOptions && (
<LoginOptions
// if cosign allows links in emails, we don't need to display the cosign
// login options, so strip them out
Expand Down

0 comments on commit db553bf

Please sign in to comment.