From d3a24238b0dc6494f611bbcf524de880806c38e1 Mon Sep 17 00:00:00 2001 From: Arnei Date: Fri, 5 Jul 2024 13:48:22 +0200 Subject: [PATCH 1/8] Start adopter registration with information page... ... instead of throwing a form right in their face. --- src/components/shared/RegistrationModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/shared/RegistrationModal.tsx b/src/components/shared/RegistrationModal.tsx index ba22d4b493..4ae9203de7 100644 --- a/src/components/shared/RegistrationModal.tsx +++ b/src/components/shared/RegistrationModal.tsx @@ -25,7 +25,7 @@ const RegistrationModal = ({ const { t } = useTranslation(); // current state of the modal that is shown - const [state, setState] = useState("form"); + const [state, setState] = useState("information"); // initial values for Formik const [initialValues, setInitialValues] = useState({ contactMe: false, From 089a55f5aa8250257e02561be68cd84f754b2ab0 Mon Sep 17 00:00:00 2001 From: Arnei Date: Fri, 5 Jul 2024 13:48:47 +0200 Subject: [PATCH 2/8] Fix header getting cut of Headers in the Adopte Registration had their top and bottom cut off. --- src/styles/extensions/views/modals/_registration.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/styles/extensions/views/modals/_registration.scss b/src/styles/extensions/views/modals/_registration.scss index 5b633b005c..99de606c13 100644 --- a/src/styles/extensions/views/modals/_registration.scss +++ b/src/styles/extensions/views/modals/_registration.scss @@ -173,6 +173,7 @@ h2 { font-size: 31px; color: $dark-prim-color; + overflow: visible; } &.for-header { From 1dec530ebd2d826a7f5e9c486ecf2161d2fe906d Mon Sep 17 00:00:00 2001 From: Arnei Date: Fri, 5 Jul 2024 13:55:40 +0200 Subject: [PATCH 3/8] Show back button on Adopter Registration form Now that we show the information first again, it makes sense to go back to the information from the form. --- src/components/shared/RegistrationModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/shared/RegistrationModal.tsx b/src/components/shared/RegistrationModal.tsx index 4ae9203de7..4320bbf362 100644 --- a/src/components/shared/RegistrationModal.tsx +++ b/src/components/shared/RegistrationModal.tsx @@ -659,7 +659,7 @@ const RegistrationModal = ({ {/* back, delete or cancel button depending on state */}
- {state !== "form" && states[state].buttons.back && ( + {states[state].buttons.back && (
)} + {/* shows summary of information */} + {state === "summary" && ( +
+
+

{t("ADOPTER_REGISTRATION.MODAL.SUMMARY_STATE.HEADER")}

+

{t("ADOPTER_REGISTRATION.MODAL.SUMMARY_STATE.GENERAL_HEADER")}

+
+
+												{JSON.stringify(formik.values, null, "\t")}
+											
+
+
+

{t("ADOPTER_REGISTRATION.MODAL.SUMMARY_STATE.STATS_HEADER")}

+
+
+ )} + {/* navigation buttons depending on state of modal */}