diff --git a/src/components/Shared/ValidationErrorsInfoDialog.js b/src/components/Shared/ValidationErrorsInfoDialog.js
index e7b2e3c..bb9eddd 100644
--- a/src/components/Shared/ValidationErrorsInfoDialog.js
+++ b/src/components/Shared/ValidationErrorsInfoDialog.js
@@ -28,39 +28,29 @@ export class ValidationErrorsInfoDialog extends React.Component {
render() {
- const actions = [
- ,
- ];
-
- return (
-
- {
- this.state.open &&
-
+ return (
+
+
- );
- }
+ })}
+
+
+ );
}
module.exports = ValidationErrorsInfoDialog;
diff --git a/src/routes/selfRegister/components/SignUp.js b/src/routes/selfRegister/components/SignUp.js
index 020c952..de05bad 100644
--- a/src/routes/selfRegister/components/SignUp.js
+++ b/src/routes/selfRegister/components/SignUp.js
@@ -17,6 +17,8 @@ import Toggle from 'material-ui/Toggle';
import Snackbar from 'material-ui/Snackbar';
import Instance from '../../../components/Connection';
+import ValidationErrorsInfoDialog from '../../../components/Shared/ValidationErrorsInfoDialog';
+
class SignUp extends React.Component {
constructor(props) {
super(props);
@@ -144,29 +146,13 @@ class SignUp extends React.Component {
});
}
- handleDismiss() {
- this.setState(Object.assign(this.state, { showErrorMessage: false }));
+ handleValidationErrosDialogDismiss() {
+ this.setState(Object.assign(this.state, {
+ showValidationErrors: false
+ }));
}
render() {
- let validationErrors = null;
- if (this.state.showValidationErrors) {
- validationErrors = (
-
- {this.state.validationErrors.map(errorMessage => {
- const oneValidationMessage = (- {errorMessage.message}
);
- const oneValidationMessageWithTab = (- {errorMessage.message}
);
-
- if (errorMessage.field_name === "password-tab") {
- return oneValidationMessageWithTab;
- } else {
- return oneValidationMessage;
- }
- })}
-
- );
- }
-
return (
@@ -245,10 +231,7 @@ class SignUp extends React.Component {
-
-
- {validationErrors}
-
+