diff --git a/plugins/talk-plugin-local-auth/client/components/ChangeEmailContentDialog.js b/plugins/talk-plugin-local-auth/client/components/ChangeEmailContentDialog.js index 1f1719444..f29dd8d86 100644 --- a/plugins/talk-plugin-local-auth/client/components/ChangeEmailContentDialog.js +++ b/plugins/talk-plugin-local-auth/client/components/ChangeEmailContentDialog.js @@ -18,10 +18,18 @@ class ChangeEmailContentDialog extends React.Component { confirmChanges = async e => { e.preventDefault(); + + if (this.formHasError()) { + this.showError(); + return; + } + await this.props.save(); this.props.next(); }; + formHasError = () => this.props.hasError('confirmPassword'); + render() { return (
@@ -53,18 +61,17 @@ class ChangeEmailContentDialog extends React.Component { type="password" onChange={this.props.onChange} defaultValue="" - hasError={ - !this.props.formData.confirmPassword && this.state.showError - } - errorMsg={t( - 'talk-plugin-local-auth.change_email.incorrect_password' - )} + hasError={this.props.hasError('confirmPassword')} + errorMsg={this.props.getError('confirmPassword')} showError={this.state.showError} columnDisplay - showSuccess={false} />
- - + {t('talk-plugin-local-auth.change_password.cancel')} - +
) : ( diff --git a/plugins/talk-plugin-local-auth/client/components/ChangeUsernameContentDialog.js b/plugins/talk-plugin-local-auth/client/components/ChangeUsernameContentDialog.js index 917d77782..3e7107922 100644 --- a/plugins/talk-plugin-local-auth/client/components/ChangeUsernameContentDialog.js +++ b/plugins/talk-plugin-local-auth/client/components/ChangeUsernameContentDialog.js @@ -84,7 +84,11 @@ class ChangeUsernameContentDialog extends React.Component {
- - -
-
- - ); - } -} - -ChangeUsernameDialog.propTypes = { - saveChanges: PropTypes.func, - closeDialog: PropTypes.func, - showDialog: PropTypes.bool, - onChange: PropTypes.func, - username: PropTypes.string, - formData: PropTypes.object, - canUsernameBeUpdated: PropTypes.bool.isRequired, - notify: PropTypes.func.isRequired, -}; - -export default ChangeUsernameDialog; diff --git a/plugins/talk-plugin-local-auth/client/components/Profile.js b/plugins/talk-plugin-local-auth/client/components/Profile.js index 85c1f1295..2b2d4be11 100644 --- a/plugins/talk-plugin-local-auth/client/components/Profile.js +++ b/plugins/talk-plugin-local-auth/client/components/Profile.js @@ -2,7 +2,7 @@ import React from 'react'; import cn from 'classnames'; import PropTypes from 'prop-types'; import styles from './Profile.css'; -import { Button } from 'plugin-api/beta/client/components/ui'; +import { Button, BareButton } from 'plugin-api/beta/client/components/ui'; import { t } from 'plugin-api/beta/client/services'; import InputField from './InputField'; import { getErrorMessages } from 'coral-framework/utils'; @@ -155,6 +155,10 @@ class Profile extends React.Component { } }; + getError = errorKey => { + return this.state.errors[errorKey]; + }; + finish = () => { this.clearForm(); this.disableEditing(); @@ -193,6 +197,7 @@ class Profile extends React.Component { formData={this.state.formData} username={username} enable={formData.newUsername && username !== formData.newUsername} + hasError={this.hasError} /> )} @@ -244,9 +251,13 @@ class Profile extends React.Component { > {t('talk-plugin-local-auth.change_username.save')} - + {t('talk-plugin-local-auth.change_username.cancel')} - + ) : ( diff --git a/plugins/talk-plugin-local-auth/client/translations.yml b/plugins/talk-plugin-local-auth/client/translations.yml index 8a3d7c90e..90c25ae0a 100644 --- a/plugins/talk-plugin-local-auth/client/translations.yml +++ b/plugins/talk-plugin-local-auth/client/translations.yml @@ -11,7 +11,7 @@ en: changed_password_msg: "Changed Password - Your password has been successfully changed" forgot_password_sent: "Forgot Password - We sent you an email to recover your password" change_username: - change_username_note: "Usernames can be changed every 14 days" + change_username_note: "Usernames can only be changed once every 14 days. Your username is not currently eligible to be updated." save: "Save" edit_profile: "Edit Profile" cancel: "Cancel" diff --git a/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js b/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js index 38d968c1d..f0e7be8f3 100644 --- a/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js +++ b/plugins/talk-plugin-profile-data/client/components/AccountDeletionRequestedSign.js @@ -37,13 +37,13 @@ class AccountDeletionRequestedSign extends React.Component {

{t('delete_request.received_on')} - {deletionScheduledFor}. + {deletionScheduledOn}.

{t('delete_request.cancel_request_description')} {' '} - {t('delete_request.before')} {deletionScheduledOn} + {t('delete_request.before')} {deletionScheduledFor} .

diff --git a/plugins/talk-plugin-profile-data/client/translations.yml b/plugins/talk-plugin-profile-data/client/translations.yml index f38958e7f..e139cfb57 100644 --- a/plugins/talk-plugin-profile-data/client/translations.yml +++ b/plugins/talk-plugin-profile-data/client/translations.yml @@ -20,9 +20,9 @@ en: cancel_account_deletion_request: "Cancel Account Deletion Request" delete_my_account: "Delete My Account" delete_my_account_description: "Deleting your account will permanently erase your profile and remove all your comments from this site." - already_submitted_request_description: "You have already submitted a request to delete your account. Your account will be deleted on {0}. You may cancel the request until that time" + already_submitted_request_description: "You have already submitted a request to delete your account. Your account will be deleted after {0}. You may cancel the request until that time" your_request_submitted_description: "Your request has been submitted and confirmation has been sent to the email address associated with your account." - your_account_deletion_scheduled: "Your account is scheduled to be deleted at:" + your_account_deletion_scheduled: "Your account is scheduled to be deleted after:" changed_your_mind: "Changed your mind?" simply_go_to: "Simply go to your account again before this time and click" tell_us_why: "Tell us why" diff --git a/plugins/talk-plugin-profile-data/server/router.js b/plugins/talk-plugin-profile-data/server/router.js index 2a2e0161a..6d8f47d03 100644 --- a/plugins/talk-plugin-profile-data/server/router.js +++ b/plugins/talk-plugin-profile-data/server/router.js @@ -71,9 +71,15 @@ async function loadComments(ctx, userID, archive, latestContentDate) { const csv = stringify(); // Add all the streams as files to the archive. - archive.append(csv, { name: 'talk-export/my_comments.csv' }); + archive.append(csv, { name: 'comments-export/my_comments.csv' }); - csv.write(['ID', 'Timestamp', 'Article', 'Link', 'Body']); + csv.write([ + 'Comment ID', + 'Published Timestamp', + 'Article URL', + 'Comment Link', + 'Comment Text', + ]); // Load the first batch's comments from the latest date that we were provided // from the token.