diff --git a/client/src/pages/UserOrganisation/Modals/EditNameModal.js b/client/src/pages/UserOrganisation/Modals/EditNameModal.js
index dd2e60ac8..4378cdf8b 100644
--- a/client/src/pages/UserOrganisation/Modals/EditNameModal.js
+++ b/client/src/pages/UserOrganisation/Modals/EditNameModal.js
@@ -7,6 +7,8 @@ import {
ReactFinalForm,
InputFieldFF,
hasValue,
+ composeValidators,
+ email,
} from '@dhis2/ui'
import PropTypes from 'prop-types'
import styles from './Modal.module.css'
@@ -17,12 +19,13 @@ const EditNameModal = ({ organisation, mutate, onClose }) => {
const successAlert = useSuccessAlert()
const errorAlert = useErrorAlert()
- const handleSubmit = async ({ name }) => {
+ const handleSubmit = async ({ name, email }) => {
try {
- await api.editOrganisation(organisation.id, { name })
+ await api.editOrganisation(organisation.id, { name, email })
mutate({
...organisation,
name,
+ email,
})
successAlert.show({
message: `Successfully updated organisation name to ${name}`,
@@ -50,6 +53,17 @@ const EditNameModal = ({ organisation, mutate, onClose }) => {
className={styles.field}
validate={hasValue}
/>
+