diff --git a/messages/renderer/en.json b/messages/renderer/en.json index fb7288fb..cd5e1513 100644 --- a/messages/renderer/en.json +++ b/messages/renderer/en.json @@ -106,13 +106,13 @@ }, "renderer.components.MapEditor.ICCAExportDialog.question1Prompt": { "description": "Question prompts", - "message": "Has your community or indigenous people collectively consented to the map\n and other information being shared with UNEP-WCMC?" + "message": "Have your community or indigenous people collectively consented to the map \n and other information being shared with UNEP-WCMC?" }, "renderer.components.MapEditor.ICCAExportDialog.question2Prompt": { - "message": "Do you want the map and other information to be available for anyone to\n view and download?" + "message": "Do you want the map and other information to be available for anyone \n to view and download?" }, "renderer.components.MapEditor.ICCAExportDialog.question3Prompt": { - "message": "Name of the community, indigenous people, or individual providing the\n information" + "message": "Name of the community, indigenous people, or individual providing the\n information (Original language, English)" }, "renderer.components.MapEditor.ICCAExportDialog.question4Answer1": { "description": "Choices for question 4", @@ -130,12 +130,44 @@ "renderer.components.MapEditor.ICCAExportDialog.question4Prompt": { "message": "If you are an individual, what is your relationship to the indigenous\n people or community?" }, - "renderer.components.MapEditor.ICCAExportDialog.question5Placeholder": { - "description": "Placeholder for question 5", - "message": "Your contact information" + "renderer.components.MapEditor.ICCAExportDialog.question5Answer1": { + "description": "Choices for question 5", + "message": "Yes - peer review" + }, + "renderer.components.MapEditor.ICCAExportDialog.question5Answer2": { + "message": "Yes - government review" + }, + "renderer.components.MapEditor.ICCAExportDialog.question5Answer3": { + "message": "No" + }, + "renderer.components.MapEditor.ICCAExportDialog.question5Answer4": { + "message": "Don’t know" }, "renderer.components.MapEditor.ICCAExportDialog.question5Prompt": { - "message": "Email address, phone number or address where we can contact you. We will\n contact you to confirm we have received your information and to discuss\n the information further where needed. We will also contact you periodically\n to make sure the information is up to date." + "message": "Has the ICCA information been reviewed either by a peer-review process \n (i.e., by other communities) or by a government body? (For more information on this topic, \n please see the ICCA data manual: https://www.wcmc.io/iccadatamanual)" + }, + "renderer.components.MapEditor.ICCAExportDialog.question6Answer1": { + "description": "Choices for question 6", + "message": "Yes - as a protected area" + }, + "renderer.components.MapEditor.ICCAExportDialog.question6Answer2": { + "message": "Yes - as an OECM" + }, + "renderer.components.MapEditor.ICCAExportDialog.question6Answer3": { + "message": "No - only as an ICCA" + }, + "renderer.components.MapEditor.ICCAExportDialog.question6Answer4": { + "message": "Don’t know" + }, + "renderer.components.MapEditor.ICCAExportDialog.question6Prompt": { + "message": "Would you like to submit the ICCA as a protected area or an other effective \n area-based conservation measure (OECM)? (For more information on this topic, \n please see the ICCA data manual: https://www.wcmc.io/iccadatamanual)" + }, + "renderer.components.MapEditor.ICCAExportDialog.question7Placeholder": { + "description": "Placeholder for question 7", + "message": "Your contact information" + }, + "renderer.components.MapEditor.ICCAExportDialog.question7Prompt": { + "message": "Email address where we can contact you. We will contact you \n to confirm we have received your information and to discuss \n the information further where needed. We will also contact you periodically \n to make sure the information is up to date." }, "renderer.components.MapEditor.ICCAExportDialog.requiredAnswer": { "description": "Helper texts", diff --git a/src/renderer/components/MapEditor/ICCAExportDialog.js b/src/renderer/components/MapEditor/ICCAExportDialog.js index c0e10f76..d56393c6 100644 --- a/src/renderer/components/MapEditor/ICCAExportDialog.js +++ b/src/renderer/components/MapEditor/ICCAExportDialog.js @@ -44,21 +44,29 @@ const msgs = defineMessages({ aboutYouSection: 'About you:', // Question prompts question1Prompt: ` - Has your community or indigenous people collectively consented to the map + Have your community or indigenous people collectively consented to the map and other information being shared with UNEP-WCMC?`, question2Prompt: ` - Do you want the map and other information to be available for anyone to - view and download?`, + Do you want the map and other information to be available for anyone + to view and download?`, question3Prompt: ` Name of the community, indigenous people, or individual providing the - information`, + information (Original language, English)`, question4Prompt: ` If you are an individual, what is your relationship to the indigenous people or community?`, question5Prompt: ` - Email address, phone number or address where we can contact you. We will - contact you to confirm we have received your information and to discuss - the information further where needed. We will also contact you periodically + Has the ICCA information been reviewed either by a peer-review process + (i.e., by other communities) or by a government body? (For more information on this topic, + please see the ICCA data manual: https://www.wcmc.io/iccadatamanual)`, + question6Prompt: ` + Would you like to submit the ICCA as a protected area or an other effective + area-based conservation measure (OECM)? (For more information on this topic, + please see the ICCA data manual: https://www.wcmc.io/iccadatamanual)`, + question7Prompt: ` + Email address where we can contact you. We will contact you + to confirm we have received your information and to discuss + the information further where needed. We will also contact you periodically to make sure the information is up to date.`, // Yes/no answers answerYes: 'Yes', @@ -69,8 +77,18 @@ const msgs = defineMessages({ 'Representative or associate of the community/indigenous people', question4Answer3: 'Representative of a non-governmental organisation', question4Answer4: 'Other', - // Placeholder for question 5 - question5Placeholder: 'Your contact information', + // Choices for question 5 + question5Answer1: 'Yes - peer review', + question5Answer2: 'Yes - government review', + question5Answer3: 'No', + question5Answer4: 'Don’t know', + // Choices for question 6 + question6Answer1: 'Yes - as a protected area', + question6Answer2: 'Yes - as an OECM', + question6Answer3: 'No - only as an ICCA', + question6Answer4: 'Don’t know', + // Placeholder for question 7 + question7Placeholder: 'Your contact information', // Helper texts requiredAnswer: 'This answer is required.', atLeastOneAnswer: 'Please fill in at least one field.', @@ -131,11 +149,15 @@ const EditDialogContent = ({ onClose, onFormError }) => { const [value3b, setValue3b] = useState('') const [value4, setValue4] = useState('') const [value5, setValue5] = useState('') + const [value6, setValue6] = useState('') + const [value7, setValue7] = useState('') const [value1Error, setValue1Error] = useState(false) const [value2Error, setValue2Error] = useState(false) const [value3Error, setValue3Error] = useState(false) const [value4Error, setValue4Error] = useState(false) const [value5Error, setValue5Error] = useState(false) + const [value6Error, setValue6Error] = useState(false) + const [value7Error, setValue7Error] = useState(false) useEffect(() => { async function determineDialogState () { @@ -179,6 +201,14 @@ const EditDialogContent = ({ onClose, onFormError }) => { setValue5Error(true) error = true } + if (value6 === '') { + setValue6Error(true) + error = true + } + if (value7 === '') { + setValue7Error(true) + error = true + } // Bail early if there's a required field missing if (error === true) { @@ -198,7 +228,9 @@ const EditDialogContent = ({ onClose, onFormError }) => { communityOriginalName: value3a, communityEnglishName: value3b, relationship: value4, - contact: value5 + information: value5, + protected: value6, + contact: value7 } remote.dialog @@ -425,9 +457,101 @@ const EditDialogContent = ({ onClose, onFormError }) => { 5. {formatMessage(msgs.question5Prompt)} - { + setValue5(e.target.value) + setValue5Error(false) + }} + > + } + label={formatMessage(msgs.question5Answer1)} + disabled={isSaving} + /> + } + label={formatMessage(msgs.question5Answer2)} + disabled={isSaving} + /> + } + label={formatMessage(msgs.question5Answer3)} + disabled={isSaving} + /> + } + label={formatMessage(msgs.question5Answer4)} + disabled={isSaving} + /> + + + {value5Error && formatMessage(msgs.requiredAnswer)} + + + + + + + + 6. {formatMessage(msgs.question6Prompt)} + + { + setValue6(e.target.value) + setValue6Error(false) + }} + > + } + label={formatMessage(msgs.question6Answer1)} + disabled={isSaving} + /> + } + label={formatMessage(msgs.question6Answer2)} + disabled={isSaving} + /> + } + label={formatMessage(msgs.question6Answer3)} + disabled={isSaving} + /> + } + label={formatMessage(msgs.question6Answer4)} + disabled={isSaving} + /> + + + {value6Error && formatMessage(msgs.requiredAnswer)} + + + + + + + + 7. {formatMessage(msgs.question7Prompt)} + + { disabled={isSaving} margin='dense' onChange={e => { - setValue5(e.target.value) - setValue5Error(false) + setValue7(e.target.value) + setValue7Error(false) }} /> - {value5Error && formatMessage(msgs.requiredAnswer)} + {value7Error && formatMessage(msgs.requiredAnswer)}