From be86b70b24cdbb896d634d97f8c7625987a886dc Mon Sep 17 00:00:00 2001 From: okbel Date: Mon, 30 Apr 2018 16:01:35 -0300 Subject: [PATCH] WIP: Steps --- .../components/ChangeEmailContentDialog.js | 23 +++----- .../components/ChangeUsernameContentDialog.js | 10 ++-- .../components/ConfirmChangesDialog.js | 56 +++++++++++++++++-- .../profile-settings/components/Profile.js | 24 ++++---- 4 files changed, 74 insertions(+), 39 deletions(-) diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/ChangeEmailContentDialog.js b/plugins/talk-plugin-auth/client/profile-settings/components/ChangeEmailContentDialog.js index 1bb8f7410..e0452601a 100644 --- a/plugins/talk-plugin-auth/client/profile-settings/components/ChangeEmailContentDialog.js +++ b/plugins/talk-plugin-auth/client/profile-settings/components/ChangeEmailContentDialog.js @@ -8,9 +8,7 @@ import { t } from 'plugin-api/beta/client/services'; class ChangeEmailContentDialog extends React.Component { state = { showError: false, - errors: { - passowrd: '', - }, + errors: {}, }; showError = () => { @@ -20,18 +18,13 @@ class ChangeEmailContentDialog extends React.Component { }; confirmChanges = async () => { - if (this.formHasError()) { - this.showError(); - } else { - await this.props.saveChanges(); - this.props.closeDialog(); - } + await this.props.saveChanges(); }; render() { return (
- + ×

@@ -43,7 +36,8 @@ class ChangeEmailContentDialog extends React.Component {

- {t('talk-plugin-auth.change_email.old_email')}: {this.props.email} + {t('talk-plugin-auth.change_email.old_email')}:{' '} + {this.props.emailAddress} {t('talk-plugin-auth.change_email.new_email')}:{' '} @@ -66,7 +60,7 @@ class ChangeEmailContentDialog extends React.Component { />
-