From e81c3b6e8a4b3206d65c965bef76c065a819ce83 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Tue, 24 Sep 2024 10:36:13 +0100 Subject: [PATCH] fix: updating form, with disclaimer to use original form --- src/backend/app/projects/project_routes.py | 1 - .../ManageProject/EditTab/FormUpdateTab.tsx | 40 ++++++++++--------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/backend/app/projects/project_routes.py b/src/backend/app/projects/project_routes.py index 1618119393..ad72c27ff3 100644 --- a/src/backend/app/projects/project_routes.py +++ b/src/backend/app/projects/project_routes.py @@ -1023,7 +1023,6 @@ async def update_project_form( project.odkid, xlsform, category, - len(project.tasks), odk_creds, ) diff --git a/src/frontend/src/components/ManageProject/EditTab/FormUpdateTab.tsx b/src/frontend/src/components/ManageProject/EditTab/FormUpdateTab.tsx index 0f44d6b98d..78bbfec8bc 100644 --- a/src/frontend/src/components/ManageProject/EditTab/FormUpdateTab.tsx +++ b/src/frontend/src/components/ManageProject/EditTab/FormUpdateTab.tsx @@ -71,24 +71,28 @@ const FormUpdateTab = ({ projectId }) => { {`if uploading the final submissions to OSM.`}

-

- Please{' '} - - dispatch( - DownloadProjectForm( - `${import.meta.env.VITE_API_URL}/projects/download-form/${projectId}/`, - 'form', - projectId, - ), - ) - } - > - download - {' '} - {`your form, modify it, before re-uploading below:`} -

+
+

⚠️ IMPORTANT ⚠️

+

+ Please{' '} + + dispatch( + DownloadProjectForm( + `${import.meta.env.VITE_API_URL}/projects/download-form/${projectId}/`, + 'form', + projectId, + ), + ) + } + > + download + {' '} + {`your form and modify it, before re-uploading below.`} +

+

Do not upload the original form, as it has since been updated.

+