From 3974f79eea8bebd3aede8437f01fc8460b4a4bf2 Mon Sep 17 00:00:00 2001 From: Viktor van Wijk Date: Tue, 18 Feb 2025 09:53:19 +0100 Subject: [PATCH] :lipstick: [open-formulieren/open-forms#5046] Remove login buttons when submission 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. --- src/components/FormStart/index.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/FormStart/index.jsx b/src/components/FormStart/index.jsx index 4d23f1c7d..ed520598f 100644 --- a/src/components/FormStart/index.jsx +++ b/src/components/FormStart/index.jsx @@ -56,6 +56,9 @@ const FormStart = () => { const hasActiveSubmission = !!submission; const isAuthenticated = hasActiveSubmission && submission.isAuthenticated; + // If there is no active submission, only show the login options if the submission limit has not + // been reached. + const showLoginOptions = !hasActiveSubmission && !form.submissionLimitReached; const doStart = useStartSubmission(); const outagePluginId = useDetectAuthenticationOutage(); @@ -166,13 +169,15 @@ const FormStart = () => { - {hasActiveSubmission ? ( + {hasActiveSubmission && ( - ) : ( + )} + + {showLoginOptions && (