Skip to content

Commit

Permalink
Merge pull request #1492 from Plant-for-the-Planet-org/Fix/conservati…
Browse files Browse the repository at this point in the history
…on_cost_m2_errorMessage

fix error message of donation for conservation form
  • Loading branch information
mariahosfeld committed Jun 1, 2022
2 parents 17971cb + 51a49ff commit 46e5e52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions public/static/locales/en/manageProjects.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"treeCostValidaitonRequired": "Please enter cost per tree",
"treeCostValidationInvalid": "Please enter valid cost per tree",
"treeCostValidation": "Cost per tree should be more than €0 or lesser than €100",
"conservationCostValidation": "Cost per m2 should be more than €0 or lesser than €100",
"projectLocation": "Project Location",
"visitorAssistanceLabel": "I will provide lodging, site access and local transport if a reviewer is sent by Plant-for-the-Planet.",
"publishProject": "Publish Project",
Expand Down
7 changes: 6 additions & 1 deletion src/features/user/ManageProjects/components/BasicDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,12 @@ export default function BasicDetails({
<span className={styles.formErrors}>
{errors.unitCost.message
? errors.unitCost.message
: t('manageProjects:treeCostValidation')}
: t(
router.query.purpose === 'trees' ||
projectDetails.purpose === 'trees'
? 'manageProjects:treeCostValidation'
: 'manageProjects:conservationCostValidation'
)}
</span>
)}
</div>
Expand Down

0 comments on commit 46e5e52

Please sign in to comment.