mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Display form errors on new lines if there are multiple
This commit is contained in:
@@ -33,7 +33,17 @@ function FormSubmitError({ error }) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Alert variant="danger" isInline title={errorMessage} />;
|
return (
|
||||||
|
<Alert
|
||||||
|
variant="danger"
|
||||||
|
isInline
|
||||||
|
title={
|
||||||
|
Array.isArray(errorMessage)
|
||||||
|
? errorMessage.map(msg => <div key={msg}>{msg}</div>)
|
||||||
|
: errorMessage
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FormSubmitError;
|
export default FormSubmitError;
|
||||||
|
|||||||
Reference in New Issue
Block a user